cc_wrapper: make built artifacts more reproducible but specifying -ffile-prefix-map
#445
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.
This PR aims to make artifacts built with
toolchains_llvm
more reproducible by specifying:in the compile and linker flags. Then in
cc_wrapper.sh
we replace${{pwd}}
with the current absolute path the script is being invoked from. This should result in builds being more reproducible by replacing absolute local paths in the binary with__bazel_toolchain_llvm_repo__
.For example, today in the MaterializeInc/materialize repo, building the
@bzip2//:bzip2
target and runningstrings
on the final binary, I get several results like this:After this PR all said entries are replaced with:
@keith I see in #440 you removed the use of
-fdebug-prefix-path
, I'm curious what you think of this since it not only effects debug info but also pre-processor macros.