Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ def default_build_triple(verbose):
host = next(x for x in version.split('\n') if x.startswith("host: "))
triple = host.split("host: ")[1]
if verbose:
print("detected default triple {}".format(triple))
print("detected default triple {} from pre-installed rustc".format(triple))
return triple
except Exception as e:
if verbose:
print("rustup not detected: {}".format(e))
print("pre-installed rustc not detected: {}".format(e))
print("falling back to auto-detect")

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

if self.verbose:
print("using downloaded stage1 artifacts from CI (commit {})".format(commit))
print("using downloaded stage2 artifacts from CI (commit {})".format(commit))
self.rustc_commit = commit
# FIXME: support downloading artifacts from the beta channel
self.download_toolchain(False, "nightly")
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1578,11 +1578,11 @@ impl<'a> Builder<'a> {
panic!("{}", out);
}
if let Some(out) = self.cache.get(&step) {
self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step));
self.verbose_than(1, &format!("{}c {:?}", " ".repeat(stack.len()), step));

return out;
}
self.verbose(&format!("{}> {:?}", " ".repeat(stack.len()), step));
self.verbose_than(1, &format!("{}> {:?}", " ".repeat(stack.len()), step));
stack.push(Box::new(step.clone()));
}

Expand All @@ -1605,7 +1605,7 @@ impl<'a> Builder<'a> {
let cur_step = stack.pop().expect("step stack empty");
assert_eq!(cur_step.downcast_ref(), Some(&step));
}
self.verbose(&format!("{}< {:?}", " ".repeat(self.stack.borrow().len()), step));
self.verbose_than(1, &format!("{}< {:?}", " ".repeat(self.stack.borrow().len()), step));
self.cache.put(step, out.clone());
out
}
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/defaults/config.tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ incremental = true
# This cuts compile times by almost 60x, but means you can't modify the compiler.
download-rustc = "if-unchanged"

[build]
# Document with the in-tree rustdoc by default, since `download-rustc` makes it quick to compile.
doc-stage = 2

[llvm]
# Will download LLVM from CI if available on your platform.
download-ci-llvm = "if-available"