EmbarkStudios / mirror-mirror

🪞 Powerful reflection library for Rust
Apache License 2.0
79 stars 2 forks source link

Switch `no-std` CI build from `thumbv6m` to `thumbv7m` #131

Closed fornwall closed 7 months ago

fornwall commented 7 months ago

As shown by rustc --target=thumbv6m-none-eabi --print=cfg, the thumbv6m-none-eabi target does not have target_has_atomic = "ptr", so portable-atomics (which once_cell switched to in 0.19) does not provide AtomicPtr::compare_exchange, which is necessary for the build.

Switch to thumbv7m-none-eabi instead, which is still a no_std target: https://doc.rust-lang.org/nightly/rustc/platform-support.html

Fixes the CI error:

error[E0599]: no method named compare_exchange found for struct portable_atomic::AtomicPtr in the current scope