Make --dry-run more useful when download-rustc is enabled
Previously, it would always treat download-rustc as set to false, which made bootstrap issues with download-rustc hard to debug.
This commit is contained in:
parent
dfe0683138
commit
e153d82c76
2 changed files with 6 additions and 2 deletions
|
|
@ -1813,11 +1813,11 @@ impl Config {
|
|||
self.download_rustc_commit().is_some()
|
||||
}
|
||||
|
||||
pub(crate) fn download_rustc_commit(&self) -> Option<&'static str> {
|
||||
pub(crate) fn download_rustc_commit(&self) -> Option<&str> {
|
||||
static DOWNLOAD_RUSTC: OnceCell<Option<String>> = OnceCell::new();
|
||||
if self.dry_run() && DOWNLOAD_RUSTC.get().is_none() {
|
||||
// avoid trying to actually download the commit
|
||||
return None;
|
||||
return self.download_rustc_commit.as_deref();
|
||||
}
|
||||
|
||||
DOWNLOAD_RUSTC
|
||||
|
|
|
|||
|
|
@ -402,6 +402,10 @@ impl Config {
|
|||
|
||||
fn ci_component_contents(&self, stamp_file: &str) -> Vec<String> {
|
||||
assert!(self.download_rustc());
|
||||
if self.dry_run() {
|
||||
return vec![];
|
||||
}
|
||||
|
||||
let ci_rustc_dir = self.out.join(&*self.build.triple).join("ci-rustc");
|
||||
let stamp_file = ci_rustc_dir.join(stamp_file);
|
||||
let contents_file = t!(File::open(&stamp_file), stamp_file.display().to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue