rustc_data_structures: Use portable AtomicU64 on 32-bit SPARC

While at it, order the list of architectures alphabetically.
This commit is contained in:
John Paul Adrian Glaubitz 2024-06-24 16:33:24 +02:00
parent 06c072f158
commit 572ae3b227
3 changed files with 7 additions and 7 deletions

View File

@ -50,7 +50,7 @@ libc = "0.2"
memmap2 = "0.2.1"
# tidy-alphabetical-end
[target.'cfg(any(target_arch = "powerpc", target_arch = "mips"))'.dependencies]
[target.'cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))'.dependencies]
portable-atomic = "1.5.1"
[features]

View File

@ -147,14 +147,14 @@ cfg_match! {
[crate::owned_slice::OwnedSlice]
);
// PowerPC and MIPS platforms with 32-bit pointers do not
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
// have AtomicU64 type.
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc", target_arch = "sparc")))]
already_sync!(
[std::sync::atomic::AtomicU64]
);
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
already_sync!(
[portable_atomic::AtomicU64]
);

View File

@ -270,12 +270,12 @@ cfg_match! {
pub use std::sync::atomic::{AtomicBool, AtomicUsize, AtomicU32};
// PowerPC and MIPS platforms with 32-bit pointers do not
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
// have AtomicU64 type.
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc")))]
pub use std::sync::atomic::AtomicU64;
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
pub use portable_atomic::AtomicU64;
pub use std::sync::Arc as Lrc;