Skip to content

Commit

Permalink
Unrolled build for rust-lang#123380
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#123380 - Nilstrieb:bomments, r=clubby789

Improve bootstrap comments

Rewrote a comment I found hard to understand, added some more.
  • Loading branch information
rust-timer committed Apr 3, 2024
2 parents 40f743d + a072103 commit a19c3fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ fn cp_rustc_component_to_ci_sysroot(
#[derive(Debug, PartialOrd, Ord, Clone, PartialEq, Eq, Hash)]
pub struct Rustc {
pub target: TargetSelection,
/// The **previous** compiler used to compile this compiler.
pub compiler: Compiler,
/// Whether to build a subset of crates, rather than the whole compiler.
///
Expand Down Expand Up @@ -1512,12 +1513,9 @@ impl Step for Sysroot {
run.never()
}

/// Returns the sysroot for the `compiler` specified that *this build system
/// generates*.
///
/// That is, the sysroot for the stage0 compiler is not what the compiler
/// thinks it is by default, but it's the same as the default for stages
/// 1-3.
/// Returns the sysroot that `compiler` is supposed to use.
/// For the stage0 compiler, this is stage0-sysroot (because of the initial std build).
/// For all other stages, it's the same stage directory that the compiler lives in.
fn run(self, builder: &Builder<'_>) -> PathBuf {
let compiler = self.compiler;
let host_dir = builder.out.join(compiler.host.triple);
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ impl Step for Llvm {
target.to_string()
};

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

0 comments on commit a19c3fb

Please sign in to comment.