Skip to content
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 1 commit into from
Mar 3, 2018

Commits on Mar 1, 2018

  1. 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 rust-lang#48019
    alexcrichton committed Mar 1, 2018
    Configuration menu
    Copy the full SHA
    2e9d9d4 View commit details
    Browse the repository at this point in the history