matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

once_cell::race does not compile on ARM #155

Closed tkaitchuck closed 2 years ago

tkaitchuck commented 3 years ago

These four lines: 1, 2, 3, 4 fail to compile on ARM because on ARM the AtomicUsize lacks a compare_exchange method. It may be possible to work around this with a load and a store and a loop.

matklad commented 3 years ago

Do you know which cfg is used to detect if it is available for a particular target?

tkaitchuck commented 3 years ago

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-e commented 3 years ago

FYI: