Skip to content

Commit 651e873

Browse files
committed
BPF: Disable atomic CAS
Enabling CAS for BPF targets (#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 #106795 Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
1 parent 44a500c commit 651e873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/spec/bpf_base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub fn opts(endian: Endian) -> TargetOptions {
66
allow_asm: true,
77
endian,
88
linker_flavor: LinkerFlavor::Bpf,
9-
atomic_cas: true,
9+
atomic_cas: false,
1010
dynamic_linking: true,
1111
no_builtins: true,
1212
panic_strategy: PanicStrategy::Abort,

0 commit comments

Comments
 (0)