Fix bootstrap rust build failure for vxworks#153333
Fix bootstrap rust build failure for vxworks#153333gautam899 wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
ping @biabbas |
This comment has been minimized.
This comment has been minimized.
|
Can you add documentation for the environment variable to https://doc.rust-lang.org/nightly/rustc/platform-support/vxworks.html? cc rust-lang/rfcs#3750 as well, which seems like the long term solution here |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Hi @Mark-Simulacrum, I don't think there is a need to add documentation about the environment variable since this is set by vxworks workbench itself. The user is not required to set this environment variable from their end. |
|
@rustbot ready |
Fixes #153332
Starting with VxWorks 25.09, struct stat was updated to use struct timespec instead of time_t for timestamp fields.
The following changes were made in libc in the commit libc.
As a result, when performing a bootstrap build with VxWorks ≥ 25.09, libc no longer exposes the fields st_mtime, st_atime, and st_ctime, as they are conditionally compiled in src/vxworks/mod.rs here libc. This causes the build to fail.
For VxWorks versions earlier than 25.09, the build completes successfully without errors.
This PR resolves the issue by detecting the WIND_RELEASE_ID environment variable (which is set in the VxWorks build environment) and conditionally guarding the affected functions in the two additional files where the errors originate.