-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc: More stable hashes of command line arguments #48641
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Mar 1, 2018
Currently rustc isn't always the best at producing deterministic builds of a crate when the source directory of a crate is changed. This is happening due to what appears two different sources: * First the `-L` paths passed to rustc are hashed into the crate hash. These paths through Cargo are typically absolute paths that can vary if the build directory changes. * Next the paths passed to `--extern` are also hashed which like `-L` can change if the build directory changes. This commit fixes these two sources of nondeterminism by ensuring that avoiding tracking the hashes of these arguments on the command line. For `-L` paths they're either related to loading crates (whose hashes are tracked elsewhere) or native librarise used in the linking phase (which isn't incremental). The `--extern` paths are similar in that they're related to crate resolution which is already tracked independently of the command line arguments. Closes rust-lang#48019
alexcrichton
force-pushed
the
no-hash-l-paths
branch
from
March 1, 2018 20:05
97efd80
to
2e9d9d4
Compare
Thanks, @alexcrichton! Nice tests @bors r+ |
📌 Commit 2e9d9d4 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Mar 2, 2018
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 2, 2018
…haelwoerister Fixes rust-lang#47311. r? @nrc
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 3, 2018
…haelwoerister Fixes rust-lang#47311. r? @nrc
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 3, 2018
…haelwoerister Fixes rust-lang#47311. r? @nrc
☔ The latest upstream changes (presumably #48689) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Mar 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently rustc isn't always the best at producing deterministic builds of a
crate when the source directory of a crate is changed. This is happening due to
what appears two different sources:
First the
-L
paths passed to rustc are hashed into the crate hash. Thesepaths through Cargo are typically absolute paths that can vary if the build
directory changes.
Next the paths passed to
--extern
are also hashed which like-L
can changeif the build directory changes.
This commit fixes these two sources of nondeterminism by ensuring that avoiding
tracking the hashes of these arguments on the command line. For
-L
pathsthey're either related to loading crates (whose hashes are tracked elsewhere) or
native librarise used in the linking phase (which isn't incremental). The
--extern
paths are similar in that they're related to crate resolution whichis already tracked independently of the command line arguments.
Closes #48019