-
Notifications
You must be signed in to change notification settings - Fork 452
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
Use relative directory for obj files hash #1270
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.
This comment has been minimized.
This comment has been minimized.
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 |
Thanks, just a few change requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just one final comment:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
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.