Skip to content

Commit ca9d14b

Browse files
authored
Rollup merge of rust-lang#91716 - jyn514:x.py-defaults, r=Mark-Simulacrum
Improve x.py logging and defaults a bit more r? ```@Mark-Simulacrum```
2 parents 3beeb75 + 6840030 commit ca9d14b

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/bootstrap/bootstrap.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ def default_build_triple(verbose):
189189
host = next(x for x in version.split('\n') if x.startswith("host: "))
190190
triple = host.split("host: ")[1]
191191
if verbose:
192-
print("detected default triple {}".format(triple))
192+
print("detected default triple {} from pre-installed rustc".format(triple))
193193
return triple
194194
except Exception as e:
195195
if verbose:
196-
print("rustup not detected: {}".format(e))
196+
print("pre-installed rustc not detected: {}".format(e))
197197
print("falling back to auto-detect")
198198

199199
required = sys.platform != 'win32'
@@ -726,12 +726,15 @@ def maybe_download_ci_toolchain(self):
726726
status = subprocess.call(["git", "diff-index", "--quiet", commit, "--", compiler, library])
727727
if status != 0:
728728
if download_rustc == "if-unchanged":
729+
if self.verbose:
730+
print("warning: saw changes to compiler/ or library/ since {}; " \
731+
"ignoring `download-rustc`".format(commit))
729732
return None
730-
print("warning: `download-rustc` is enabled, but there are changes to \
731-
compiler/ or library/")
733+
print("warning: `download-rustc` is enabled, but there are changes to " \
734+
"compiler/ or library/")
732735

733736
if self.verbose:
734-
print("using downloaded stage1 artifacts from CI (commit {})".format(commit))
737+
print("using downloaded stage2 artifacts from CI (commit {})".format(commit))
735738
self.rustc_commit = commit
736739
# FIXME: support downloading artifacts from the beta channel
737740
self.download_toolchain(False, "nightly")

src/bootstrap/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,11 +1578,11 @@ impl<'a> Builder<'a> {
15781578
panic!("{}", out);
15791579
}
15801580
if let Some(out) = self.cache.get(&step) {
1581-
self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step));
1581+
self.verbose_than(1, &format!("{}c {:?}", " ".repeat(stack.len()), step));
15821582

15831583
return out;
15841584
}
1585-
self.verbose(&format!("{}> {:?}", " ".repeat(stack.len()), step));
1585+
self.verbose_than(1, &format!("{}> {:?}", " ".repeat(stack.len()), step));
15861586
stack.push(Box::new(step.clone()));
15871587
}
15881588

@@ -1605,7 +1605,7 @@ impl<'a> Builder<'a> {
16051605
let cur_step = stack.pop().expect("step stack empty");
16061606
assert_eq!(cur_step.downcast_ref(), Some(&step));
16071607
}
1608-
self.verbose(&format!("{}< {:?}", " ".repeat(self.stack.borrow().len()), step));
1608+
self.verbose_than(1, &format!("{}< {:?}", " ".repeat(self.stack.borrow().len()), step));
16091609
self.cache.put(step, out.clone());
16101610
out
16111611
}

src/bootstrap/defaults/config.tools.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ incremental = true
1111
# This cuts compile times by almost 60x, but means you can't modify the compiler.
1212
download-rustc = "if-unchanged"
1313

14+
[build]
15+
# Document with the in-tree rustdoc by default, since `download-rustc` makes it quick to compile.
16+
doc-stage = 2
17+
1418
[llvm]
1519
# Will download LLVM from CI if available on your platform.
1620
download-ci-llvm = "if-available"

0 commit comments

Comments
 (0)