rustc_data_structures: Explicitly check for 64-bit atomics support#127075
rustc_data_structures: Explicitly check for 64-bit atomics support#127075bors merged 1 commit intorust-lang:masterfrom
Conversation
|
FWIW, I think we can use |
Good idea. Can we use this in the |
|
Thanks! If |
|
@bors delegate+ |
|
✌️ @glaubitz, you can now approve this pull request! If @SparrowLii told you to " |
Instead of keeping a list of architectures which have native support for 64-bit atomics, just use #[cfg(target_has_atomic = "64")] and its inverted counterpart to determine whether we need to use portable AtomicU64 on the target architecture.
0167244 to
ab1b48e
Compare
…rrowLii rustc_data_structures: Explicitly check for 64-bit atomics support Instead of keeping a list of architectures which have native support for 64-bit atomics, just use #[cfg(target_has_atomic = "64")] and its inverted counterpart to determine whether we need to use portable AtomicU64 on the target architecture.
…llaumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#123714 (Add test for fn pointer duplication.) - rust-lang#124091 (Update AST validation module docs) - rust-lang#126963 (Add basic Serde serialization capabilities to Stable MIR) - rust-lang#127015 (Switch back `non_local_definitions` lint to allow-by-default) - rust-lang#127016 (docs: check if the disambiguator matches its suffix) - rust-lang#127029 (Fix Markdown tables in platform-support.md) - rust-lang#127032 (Enable const casting for `f16` and `f128`) - rust-lang#127041 (Migrate `run-make/override-aliased-flags` to `rmake.rs`) - rust-lang#127045 (Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated) - rust-lang#127075 (rustc_data_structures: Explicitly check for 64-bit atomics support) r? `@ghost` `@rustbot` modify labels: rollup
|
@SparrowLii This seems to be fallen out of the merge queue. Any ideas? |
|
@glaubitz Seems not related to this PR Just wait for #127111 to merge |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#126822 (Bootstrap command refactoring: port more `Command` usages to `BootstrapCmd` (step 2)) - rust-lang#126835 (Simplifications in match lowering) - rust-lang#126953 (std: separate TLS key creation from TLS access) - rust-lang#127045 (Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated) - rust-lang#127075 (rustc_data_structures: Explicitly check for 64-bit atomics support) - rust-lang#127101 (remove redundant match statement from dataflow const prop) - rust-lang#127102 (Rename fuchsia builder and bump Fuchsia) - rust-lang#127103 (Move binder and polarity parsing into `parse_generic_ty_bound`) - rust-lang#127108 (unify `dylib` and `bin_helpers` and create `shared_helpers::parse_value_from_args`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127075 - glaubitz:copy-and-paste-fix, r=SparrowLii rustc_data_structures: Explicitly check for 64-bit atomics support Instead of keeping a list of architectures which have native support for 64-bit atomics, just use #[cfg(target_has_atomic = "64")] and its inverted counterpart to determine whether we need to use portable AtomicU64 on the target architecture.
| // MIPS, PowerPC and SPARC platforms with 32-bit pointers do not | ||
| // have AtomicU64 type. | ||
| #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc", target_arch = "sparc")))] | ||
| // Use portable AtomicU64 for targets without native 64-bit atomics |
There was a problem hiding this comment.
Wrong comment position, should be placed before line 156.
There was a problem hiding this comment.
The comment applies to both the following statements, see the comment from the previous version.
Instead of keeping a list of architectures which have native support
for 64-bit atomics, just use #[cfg(target_has_atomic = "64")] and its
inverted counterpart to determine whether we need to use portable
AtomicU64 on the target architecture.