once_cell::race does not compile on ARM
tkaitchuck opened this issue · comments
Tom Kaitchuck commented
Alex Kladov commented
Do you know which cfg is used to detect if it is available for a particular target?
Tom Kaitchuck commented
The only way I am aware of is by using target_arch = "arm"
. I don't know if there is a list somewhere of which architectures have which features.
Taiki Endo commented
FYI:
- futures, crossbeam, heapless, defmt, etc. detect these targets using the TARGET environment variables provided by cargo for the build script and a list of targets that do not have atomic CAS. See rust-lang/futures-rs#2400 for more.
- Another way that is available in stable rust is to use crates like autocfg. See rust-lang/futures-rs#2294 for more.