-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable atomic cas for bpf targets #105708
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon. Please see the contribution instructions for more information. |
These commits modify compiler targets. |
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason why anybody would want to use an older target-cpu
with BPF targets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support older kernels
@bors r+ |
…agisa Enable atomic cas for bpf targets It seems like LLVM now supports it. https://reviews.llvm.org/D72184 - the PR in LLVM
Rollup of 9 pull requests Successful merges: - rust-lang#105034 (Add example for iterator_flatten) - rust-lang#105708 (Enable atomic cas for bpf targets) - rust-lang#106175 (Fix bad import suggestion with nested `use` tree) - rust-lang#106204 (No need to take opaques in `check_type_bounds`) - rust-lang#106387 (Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`") - rust-lang#106636 (Accept old spelling of Fuchsia target triples) - rust-lang#106639 (update Miri) - rust-lang#106640 (update test for inductive canonical cycles) - rust-lang#106647 (rustdoc: merge common CSS for `a`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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 <[email protected]>
…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 <[email protected]>
It seems like LLVM now supports it.
https://reviews.llvm.org/D72184 - the PR in LLVM