-
Notifications
You must be signed in to change notification settings - Fork 230
Compilation error on platforms that do not have AtomicU32 from #896 #908
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
Comments
@tgross35 flagging this for your consideration. |
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this issue
May 6, 2025
The `feature_detect` module is currently being built on all targets, but the use of `AtomicU32` causes a problem if atomics are not available (such as with `bpfel-unknown-none`). Gate this module behind `target_has_atomic = "ptr"`. The below now completes successfully: cargo build -p compiler_builtins --target=bpfel-unknown-none -Z build-std=core Fixes: rust-lang#908
Thanks for reporting, this is indeed the correct place. #909 should resolve this. |
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this issue
May 6, 2025
The `feature_detect` module is currently being built on all targets, but the use of `AtomicU32` causes a problem if atomics are not available (such as with `bpfel-unknown-none`). Gate this module behind `target_has_atomic = "ptr"`. The below now completes successfully: cargo build -p compiler_builtins --target=bpfel-unknown-none -Z build-std=core Fixes: rust-lang#908
tgross35
added a commit
that referenced
this issue
May 6, 2025
The `feature_detect` module is currently being built on all targets, but the use of `AtomicU32` causes a problem if atomics are not available (such as with `bpfel-unknown-none`). Gate this module behind `target_has_atomic = "ptr"`. The below now completes successfully: cargo build -p compiler_builtins --target=bpfel-unknown-none -Z build-std=core Fixes: #908
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope this is the correct place to file this issue, I'm not too familiar with rust internals.
The recent change #896 adds an import for AtomicU32, but this is not available on the "bpfel-unknown-none" target. This is causing a downstream build issue in aya.
Reproduction:
Downstream issue
This can be seen in a real-life example by following the instructions here for setting up an aya template repository, which will fail to build with the same error
The text was updated successfully, but these errors were encountered: