Skip to content

Commit

Permalink
Pass +forced-atomics feature for riscv32{i,im,imc}-unknown-none-elf
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 20, 2023
1 parent 484cb4e commit b0346d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(0),
max_atomic_width: Some(32),
atomic_cas: false,
features: "+forced-atomics".into(),
panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
emit_debug_gdb_scripts: false,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(0),
max_atomic_width: Some(32),
atomic_cas: false,
features: "+m".into(),
features: "+m,+forced-atomics".into(),
panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
emit_debug_gdb_scripts: false,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(0),
max_atomic_width: Some(32),
atomic_cas: false,
features: "+m,+c".into(),
features: "+m,+c,+forced-atomics".into(),
panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
emit_debug_gdb_scripts: false,
Expand Down

0 comments on commit b0346d5

Please sign in to comment.