Skip to content

Commit ca42c25

Browse files
committed
[RISCV] Disable Atomics on all Non-A RISC-V targets
1 parent 2cad8bb commit ca42c25

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc_target/spec/riscv32i_unknown_none_elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn target() -> TargetResult {
1717
options: TargetOptions {
1818
linker: Some("rust-lld".to_string()),
1919
cpu: "generic-rv32".to_string(),
20-
max_atomic_width: None,
20+
max_atomic_width: Some(0),
2121
atomic_cas: false,
2222
features: String::new(),
2323
executables: true,

src/librustc_target/spec/riscv32imc_unknown_none_elf.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ pub fn target() -> TargetResult {
1717
options: TargetOptions {
1818
linker: Some("rust-lld".to_string()),
1919
cpu: "generic-rv32".to_string(),
20-
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86005
21-
max_atomic_width: None, //Some(32),
20+
max_atomic_width: Some(0),
2221
atomic_cas: false,
2322
features: "+m,+c".to_string(),
2423
executables: true,

0 commit comments

Comments
 (0)