Skip to content

Commit 572ae3b

Browse files
committed
rustc_data_structures: Use portable AtomicU64 on 32-bit SPARC
While at it, order the list of architectures alphabetically.
1 parent 06c072f commit 572ae3b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/rustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ libc = "0.2"
5050
memmap2 = "0.2.1"
5151
# tidy-alphabetical-end
5252

53-
[target.'cfg(any(target_arch = "powerpc", target_arch = "mips"))'.dependencies]
53+
[target.'cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))'.dependencies]
5454
portable-atomic = "1.5.1"
5555

5656
[features]

compiler/rustc_data_structures/src/marker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ cfg_match! {
147147
[crate::owned_slice::OwnedSlice]
148148
);
149149

150-
// PowerPC and MIPS platforms with 32-bit pointers do not
150+
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
151151
// have AtomicU64 type.
152-
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
152+
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc", target_arch = "sparc")))]
153153
already_sync!(
154154
[std::sync::atomic::AtomicU64]
155155
);
156156

157-
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
157+
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
158158
already_sync!(
159159
[portable_atomic::AtomicU64]
160160
);

compiler/rustc_data_structures/src/sync.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ cfg_match! {
270270

271271
pub use std::sync::atomic::{AtomicBool, AtomicUsize, AtomicU32};
272272

273-
// PowerPC and MIPS platforms with 32-bit pointers do not
273+
// MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
274274
// have AtomicU64 type.
275-
#[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
275+
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc")))]
276276
pub use std::sync::atomic::AtomicU64;
277277

278-
#[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
278+
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
279279
pub use portable_atomic::AtomicU64;
280280

281281
pub use std::sync::Arc as Lrc;

0 commit comments

Comments
 (0)