Skip to content

Commit

Permalink
Add escape hatch for nightly version hashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Apr 8, 2020
1 parent 6e3f35b commit fdfdb3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/context/compilation_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ fn compute_metadata<'a, 'cfg>(

fn hash_rustc_version(bcx: &BuildContext<'_, '_>, hasher: &mut SipHasher) {
let vers = &bcx.rustc().version;
if vers.pre.is_empty() {
if vers.pre.is_empty() || bcx.config.cli_unstable().separate_nightlies {
// For stable, keep the artifacts separate. This helps if someone is
// testing multiple versions, to avoid recompiles.
bcx.rustc().verbose_version.hash(hasher);
Expand Down
2 changes: 2 additions & 0 deletions src/cargo/core/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ pub struct CliUnstable {
pub jobserver_per_rustc: bool,
pub features: Option<Vec<String>>,
pub crate_versions: bool,
pub separate_nightlies: bool,
}

impl CliUnstable {
Expand Down Expand Up @@ -420,6 +421,7 @@ impl CliUnstable {
"jobserver-per-rustc" => self.jobserver_per_rustc = parse_empty(k, v)?,
"features" => self.features = Some(parse_features(v)),
"crate-versions" => self.crate_versions = parse_empty(k, v)?,
"separate-nightlies" => self.separate_nightlies = parse_empty(k, v)?,
_ => bail!("unknown `-Z` flag specified: {}", k),
}

Expand Down

0 comments on commit fdfdb3d

Please sign in to comment.