about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-03-01 07:51:00 -0800
committerAlex Crichton <alex@alexcrichton.com>2018-03-01 12:05:53 -0800
commit2e9d9d48d5b93fdb800eead15f658f47100e2d3c (patch)
tree3d489fb7832c10c76077e9e328d352c41b3d0ac9 /src/rustllvm/RustWrapper.cpp
parenta85417f5938023d1491b44d94da705f539bb8b17 (diff)
downloadrust-2e9d9d48d5b93fdb800eead15f658f47100e2d3c.tar.gz
rust-2e9d9d48d5b93fdb800eead15f658f47100e2d3c.zip
rustc: More stable hashes of command line arguments
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 #48019
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions