Conversation
ci/verify-build.sh
Outdated
| if [ "$os" = "linux" ]; then | ||
| # Test with the equivalent of __USE_TIME_BITS64 | ||
| RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd | ||
| RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd --target-dir "target/$target-time64" |
There was a problem hiding this comment.
Instead of the changes to this file, could you add println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64") to build.rs?
There was a problem hiding this comment.
I've pushed an attempt. It seems to trigger rebuilds, but I'm not sure it's in the right place.
There was a problem hiding this comment.
Do you just mean the right place within build.rs? If so, I would put it immediately before/after the env is read at let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok(); so it's easy to see they go together.
LGTM otherwise, note that CI will fail until a rust-lang/rust fix gets into nightly.
There was a problem hiding this comment.
That was my question. I moved things around a bit to collect the linux_time_bits64 stuff in one place as much as possible.
45eefd1 to
57ffa6c
Compare
tgross35
left a comment
There was a problem hiding this comment.
Thanks for following up, this looks good to merge as soon as CI gets fixed.
Collect the linux_time_bits64 in one place.
The _NEW defines are not available in musl and ohos.
57ffa6c to
b0e6878
Compare
Collect the linux_time_bits64 in one place. (backport <rust-lang#4242>) (cherry picked from commit 9a861ed)
The _NEW defines are not available in musl and ohos. (backport <rust-lang#4242>) (cherry picked from commit b0e6878)
Some identifiers for #4148 was missing, and this was not detected because
verify-builddoes not rebuild whenRUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 is set.
Fix the
verify-buildtask by using a separatetarget-dirand add the missing identifiersThis is probably not the best way of structuring the CI steps, it could also be set up using a matrix in the
verify-buildtask ofci.yml.Sources
https://github.com/torvalds/linux/blob/master/arch/mips/include/uapi/asm/socket.h#L125
https://github.com/torvalds/linux/blob/master/arch/powerpc/include/uapi/asm/socket.h
https://github.com/torvalds/linux/blob/master/tools/include/uapi/asm-generic/socket.h
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI