Skip to content

Commit fdfdb3d

Browse files
committed
Add escape hatch for nightly version hashing.
1 parent 6e3f35b commit fdfdb3d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cargo/core/compiler/context/compilation_files.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ fn compute_metadata<'a, 'cfg>(
644644

645645
fn hash_rustc_version(bcx: &BuildContext<'_, '_>, hasher: &mut SipHasher) {
646646
let vers = &bcx.rustc().version;
647-
if vers.pre.is_empty() {
647+
if vers.pre.is_empty() || bcx.config.cli_unstable().separate_nightlies {
648648
// For stable, keep the artifacts separate. This helps if someone is
649649
// testing multiple versions, to avoid recompiles.
650650
bcx.rustc().verbose_version.hash(hasher);

src/cargo/core/features.rs

+2
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ pub struct CliUnstable {
343343
pub jobserver_per_rustc: bool,
344344
pub features: Option<Vec<String>>,
345345
pub crate_versions: bool,
346+
pub separate_nightlies: bool,
346347
}
347348

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

0 commit comments

Comments
 (0)