-
Notifications
You must be signed in to change notification settings - Fork 1k
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(wasi): Add back unsafe block for clockid_t static variables #4157
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Is the MSRV not getting checked in CI on wasi? I'm not sure why this would be failing. Please target |
It looks like the target just didn't get added to https://github.com/rust-lang/libc/blob/511e3f2cb7e4ca24ffbe0ce33879faf733717228/ci/verify-build.sh. Could you add it here? It will need to check if Cc @alexcrichton if you have any better ideas here. |
@DarumaDocker could you please target the |
Do you mean I should fork from main and create a new PR? |
Just rebase onto |
ci/verify-build.sh
Outdated
if [ "$rust" = "stable" ] || [ "$rust" = "nightly" ]; then | ||
test_target "$target" | ||
else | ||
if [ "$target" = "wasm32-wasip1" ]; then | ||
test_target "wasm32-wasi" | ||
elif [ "$target" != "wasm32-wasip2" ]; then | ||
test_target "$target" | ||
fi | ||
fi |
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.
I think this might be cleaner as a case statement
case "$target" in
"stable") supports_wasi_pn=1 ;;
"beta") supports_wasi_pn=1 ;;
"nightly") supports_wasi_pn=1 ;;
*) supports_wasi_pn=0 ;;
esac
# `wasm32-wasip1` was renamed from `wasm32-wasi`
if [ "$target" = "wasm32-wasip1" ] && [ "$supports_wasi_pn" = "0" ]; then
target="wasm32-wasi"
fi
# `wasm32-wasip2` only exists in recent versions of Rust
if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then
continue
fi
test_target "$target"
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.
Done
(backport <rust-lang#4157>) (cherry picked from commit 5fc0321)
(backport <rust-lang#4157>) (cherry picked from commit 8e8a512)
(backport <rust-lang#4157>) (cherry picked from commit 5fc0321)
Released in 0.2.167 |
Personally I'd consider it reasonable to have a different MSRV for certain targets, for example WASI. It looks like this got worked out in the end though |
The MSRV is still far before 1.82.0
Description
Version 0.2.166 can not be built for the wasm32-wasi target caused by the removed
unsafe
block.This commit is taking them back.
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI