summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/bpf_base.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /compiler/rustc_target/src/spec/bpf_base.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_target/src/spec/bpf_base.rs')
-rw-r--r--compiler/rustc_target/src/spec/bpf_base.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/bpf_base.rs b/compiler/rustc_target/src/spec/bpf_base.rs
index baf365871..2b00cda44 100644
--- a/compiler/rustc_target/src/spec/bpf_base.rs
+++ b/compiler/rustc_target/src/spec/bpf_base.rs
@@ -6,7 +6,7 @@ pub fn opts(endian: Endian) -> TargetOptions {
allow_asm: true,
endian,
linker_flavor: LinkerFlavor::Bpf,
- atomic_cas: false,
+ atomic_cas: true,
dynamic_linking: true,
no_builtins: true,
panic_strategy: PanicStrategy::Abort,
@@ -19,6 +19,10 @@ pub fn opts(endian: Endian) -> TargetOptions {
obj_is_bitcode: true,
requires_lto: false,
singlethread: true,
+ // When targeting the `v3` cpu in llvm, 32-bit atomics are also supported.
+ // But making this value change based on the target cpu can be mostly confusing
+ // and would require a bit of a refactor.
+ min_atomic_width: Some(64),
max_atomic_width: Some(64),
..Default::default()
}