Skip to content

Commit f756095

Browse files
authored
Rollup merge of #123380 - Nilstrieb:bomments, r=clubby789
Improve bootstrap comments Rewrote a comment I found hard to understand, added some more.
2 parents 9c1c0bf + a072103 commit f756095

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ fn cp_rustc_component_to_ci_sysroot(
825825
#[derive(Debug, PartialOrd, Ord, Clone, PartialEq, Eq, Hash)]
826826
pub struct Rustc {
827827
pub target: TargetSelection,
828+
/// The **previous** compiler used to compile this compiler.
828829
pub compiler: Compiler,
829830
/// Whether to build a subset of crates, rather than the whole compiler.
830831
///
@@ -1512,12 +1513,9 @@ impl Step for Sysroot {
15121513
run.never()
15131514
}
15141515

1515-
/// Returns the sysroot for the `compiler` specified that *this build system
1516-
/// generates*.
1517-
///
1518-
/// That is, the sysroot for the stage0 compiler is not what the compiler
1519-
/// thinks it is by default, but it's the same as the default for stages
1520-
/// 1-3.
1516+
/// Returns the sysroot that `compiler` is supposed to use.
1517+
/// For the stage0 compiler, this is stage0-sysroot (because of the initial std build).
1518+
/// For all other stages, it's the same stage directory that the compiler lives in.
15211519
fn run(self, builder: &Builder<'_>) -> PathBuf {
15221520
let compiler = self.compiler;
15231521
let host_dir = builder.out.join(compiler.host.triple);

src/bootstrap/src/core/build_steps/llvm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ impl Step for Llvm {
274274
target.to_string()
275275
};
276276

277+
// If LLVM has already been built or been downloaded through download-ci-llvm, we avoid building it again.
277278
let Meta { stamp, res, out_dir, root } = match prebuilt_llvm_config(builder, target) {
278279
Ok(p) => return p,
279280
Err(m) => m,

0 commit comments

Comments
 (0)