Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Use cfg(target_has_atomic) instead of hard coding which targets support atomics #413

Closed
bjorn3 opened this issue Oct 26, 2023 · 2 comments
Closed

Comments

@bjorn3
Copy link

bjorn3 commented Oct 26, 2023

This has been stable since 1.60.0: rust-lang/rust#93824 The hard coded list is bound to go out of sync with rustc, especially when new targets get added. In fact it is already wildly out of sync. You currently only disable 64-bit atomics for 32bit arm, powerpc and mips, but a lot more targets like riscv32, sparc and thumb also don't support them: https://github.com/crossbeam-rs/crossbeam/blob/5fd21b032388c2e418c7306ba6149e1881943c31/no_atomic.rs#L19-L78 As rustc itself depends on crossbeam, this means it isn't possible to build rustc for targets lacking some atomics until a new crossbeam release with those new targets. Using cfg(target_has_atomic) will immediately work.

@bjorn3
Copy link
Author

bjorn3 commented Oct 26, 2023

@Pr0methean
Copy link
Member

This was rendered obsolete by zip-rs/zip2@9438bef.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants