Use relative directory for obj files hash#1270
Merged
NobodyXu merged 5 commits intorust-lang:mainfrom Nov 8, 2024
Merged
Conversation
When producing `.o` files, the absolute path of each source file is hashed and used as a prefix for the output object files. While this avoids clashes between different source files with the same basenames, this causes determinism issues in the build as the full system path influences the build output. This change strips the out_dir parent from the source file paths, assuming that the source files are in the out_dir as well.
NobodyXu
reviewed
Nov 5, 2024
Contributor
Author
This comment has been minimized.
This comment has been minimized.
Contributor
|
Actually, it's ok to use env::var here, because CARGO_* is a cargo env that always triggers rebuild. You just need to add a clippy ignore and a comment emplaning why the clippy lint is ignored |
NobodyXu
requested changes
Nov 7, 2024
Contributor
|
Thanks, just a few change requests |
NobodyXu
requested changes
Nov 7, 2024
Contributor
NobodyXu
left a comment
There was a problem hiding this comment.
Thanks, just one final comment:
Merged
nmattia
added a commit
to dfinity/ic
that referenced
this pull request
Jan 17, 2025
This bumps the version of the `cc` crate. This version includes a [fix](rust-lang/cc-rs#1270) for build reproducibility, meaning we can drop our patch.
github-merge-queue Bot
pushed a commit
to dfinity/ic
that referenced
this pull request
Jan 17, 2025
This bumps the version of the `cc` crate. This version includes a [fix](rust-lang/cc-rs#1270) for build reproducibility, meaning we can drop our patch.
badicsalex
added a commit
to Foundation-Devices/prime-ble-firmware
that referenced
this pull request
May 23, 2025
badicsalex
added a commit
to Foundation-Devices/prime-ble-firmware
that referenced
this pull request
May 23, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When producing
.ofiles, the absolute path of each source file is hashed and used as a prefix for the output object files. While this avoids clashes between different source files with the same basenames, this causes determinism issues in the build as the full system path influences the build output.This change strips the out_dir parent from the source file paths, assuming that the source files are in the out_dir as well.