-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix std
compilation error for wasi+atomics
#110587
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
As a heads up, I'll probably open another PR afterwards to make |
@tomaka right now you need to also build the compiler to use a local std in a dev toolchain, see #101691. you can run |
Or maybe not. Nonetheless, this small PR is still worth merging, since it moves the situation from "doesn't compile" to "compiles". |
How can I test this change?
|
ah, using
@bors r+ rollup |
Rollup of 9 pull requests Successful merges: - rust-lang#108416 (black_box doc corrections for clarification - Issue rust-lang#107957) - rust-lang#109379 (Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs`) - rust-lang#110266 (Update documentation wording on path 'try_exists' functions) - rust-lang#110329 (Improve tests for rust-lang#110138) - rust-lang#110418 (Spelling rustdoc) - rust-lang#110587 (Fix `std` compilation error for wasi+atomics) - rust-lang#110594 (`rustc --help` add `--cfg` SPEC declaration.) - rust-lang#110792 (Use the standard macOS CI runner) - rust-lang#110817 (Add regression tests for const-generic inherent associated types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix #109727
It seems that the
unsupported/once.rs
module isn't meant to exist at the same time as thefutex
module, as they have conflicting definitions.I've solved this by defining the
once
module only ifnot(target_feature = "atomics")
.The
wasm32-unknown-unknown
target similarly only defines theonce
module ifnot(target_feature = "atomics")
.As show in this block of code, the
sys::once
module doesn't need to exist ifall(target_arch = "wasm32", target_feature = "atomics")
.