Skip to content

Commit

Permalink
Rollup merge of rust-lang#106796 - vadorovsky:revert-105708-enable-at…
Browse files Browse the repository at this point in the history
…omic-cas-bpf, r=bjorn3

BPF: Disable atomic CAS

Enabling CAS for BPF targets (rust-lang#105708) breaks the build of core library.
The failure occurs both when building rustc for BPF targets and when
building crates for BPF targets with the current nightly.

The LLVM BPF backend does not correctly lower all `atomicrmw` operations
and crashes for unsupported ones.

Before we can enable CAS for BPF in Rust, we need to fix the LLVM BPF
backend first.

Fixes rust-lang#106795

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
  • Loading branch information
JohnTitor authored Jan 23, 2023
2 parents 6b3cd03 + 651e873 commit 9e79642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/bpf_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn opts(endian: Endian) -> TargetOptions {
allow_asm: true,
endian,
linker_flavor: LinkerFlavor::Bpf,
atomic_cas: true,
atomic_cas: false,
dynamic_linking: true,
no_builtins: true,
panic_strategy: PanicStrategy::Abort,
Expand Down

0 comments on commit 9e79642

Please sign in to comment.