未验证 提交 6f36f1ff 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #114497 - taiki-e:revert-riscv-atomic, r=Amanieu

Revert #98333 "Re-enable atomic loads and stores for all RISC-V targets"

This reverts #98333.

As said in https://github.com/rust-lang/rust/pull/98333#issuecomment-1666375293, `forced-atomics` target feature is also needed to enable atomic load/store on these targets (otherwise, libcalls are generated): https://godbolt.org/z/433qeG7vd

However, `forced-atomics` target feature is currently broken (https://github.com/rust-lang/rust/issues/114153), so AFAIK, there is currently no way to enable atomic load/store (via core::intrinsics) on these targets properly.

r? `@Amanieu`
......@@ -11,7 +11,7 @@ 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(32),
max_atomic_width: Some(0),
atomic_cas: false,
panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
......
......@@ -11,7 +11,7 @@ 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(32),
max_atomic_width: Some(0),
atomic_cas: false,
features: "+m".into(),
panic_strategy: PanicStrategy::Abort,
......
......@@ -11,7 +11,7 @@ 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(32),
max_atomic_width: Some(0),
atomic_cas: false,
features: "+m,+c".into(),
panic_strategy: PanicStrategy::Abort,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册