Enable atomic cas for bpf targets
This commit is contained in:
parent
ba64ba8b0d
commit
11331b1030
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ pub fn opts(endian: Endian) -> TargetOptions {
|
||||||
allow_asm: true,
|
allow_asm: true,
|
||||||
endian,
|
endian,
|
||||||
linker_flavor: LinkerFlavor::Bpf,
|
linker_flavor: LinkerFlavor::Bpf,
|
||||||
atomic_cas: false,
|
atomic_cas: true,
|
||||||
dynamic_linking: true,
|
dynamic_linking: true,
|
||||||
no_builtins: true,
|
no_builtins: true,
|
||||||
panic_strategy: PanicStrategy::Abort,
|
panic_strategy: PanicStrategy::Abort,
|
||||||
|
@ -19,6 +19,10 @@ pub fn opts(endian: Endian) -> TargetOptions {
|
||||||
obj_is_bitcode: true,
|
obj_is_bitcode: true,
|
||||||
requires_lto: false,
|
requires_lto: false,
|
||||||
singlethread: true,
|
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),
|
max_atomic_width: Some(64),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue