-
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
Hash the remapped sysroot instead of the original. #63505
Conversation
This will help reproducible builds, as the sysroot depends on the working directory.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This LGTM, but just to be sure, r? @alexcrichton |
Thanks for the PR! Since the sysroot argument is only used to load other libraries, which are themselves all tracked, I think we may be able to get by from just skipping the sysroot hashing entirely? |
As suggested by @alexcrichton, the sysroot only loads libraries that are themselves tracked.
I didn't know the other libraries were themselves tracked; that does make this cleaner. All the tests seemed to pass locally, so here it is. |
@bors: r+ |
📌 Commit 692c0bf has been approved by |
There's a problem with the test runner: the Azure dashboard shows the test as having passed about 20 hours ago, but the Github dashboard doesn't see it. Can the test be restarted or something? |
That's ok those are just PR tests, this is in the queue to be tested and merged in full. |
Ah, okay. Thanks! |
Hash the remapped sysroot instead of the original. One of the reasons that rustc builds are not reproducible is because the --sysroot path is dependent on the current directory. We can fix this by hashing the remapped sysroot instead of the original when applicable. Note that with this patch, the hash will stay the same if both the sysroot and the remapped path change. However, given that if the contents of the sysroot change the hash will also stay the same, this might be acceptable. I would appreciate feedback on the best way to do this. This helps rust-lang#34902, although it does not fix it by itself.
@bors p=1 |
Hash the remapped sysroot instead of the original. One of the reasons that rustc builds are not reproducible is because the --sysroot path is dependent on the current directory. We can fix this by hashing the remapped sysroot instead of the original when applicable. Note that with this patch, the hash will stay the same if both the sysroot and the remapped path change. However, given that if the contents of the sysroot change the hash will also stay the same, this might be acceptable. I would appreciate feedback on the best way to do this. This helps rust-lang#34902, although it does not fix it by itself.
⌛ Testing commit 692c0bf with merge 50cc578efa01a276f3869cf28cc0aa543f3d8462... |
Hash the remapped sysroot instead of the original. One of the reasons that rustc builds are not reproducible is because the --sysroot path is dependent on the current directory. We can fix this by hashing the remapped sysroot instead of the original when applicable. Note that with this patch, the hash will stay the same if both the sysroot and the remapped path change. However, given that if the contents of the sysroot change the hash will also stay the same, this might be acceptable. I would appreciate feedback on the best way to do this. This helps rust-lang#34902, although it does not fix it by itself.
@bors retry rolled up. |
Rollup of 4 pull requests Successful merges: - #62737 (Override Cycle::try_fold) - #63505 (Hash the remapped sysroot instead of the original.) - #63559 (rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.) - #63621 (Modify librustc_llvm to pass -DNDEBUG while compiling.) Failed merges: r? @ghost
Looks like the PR title / description no longer reflects the PR content? |
☔ The latest upstream changes (presumably #63655) made this pull request unmergeable. Please resolve the merge conflicts. |
One of the reasons that rustc builds are not reproducible is because the --sysroot path is dependent on the current directory. We can fix this by hashing the remapped sysroot instead of the original when applicable.
Note that with this patch, the hash will stay the same if both the sysroot and the remapped path change. However, given that if the contents of the sysroot change the hash will also stay the same, this might be acceptable. I would appreciate feedback on the best way to do this.
This helps #34902, although it does not fix it by itself.