Skip to content

Commit 4f1b3e3

Browse files
committed
Clarify comments
1 parent e6bb644 commit 4f1b3e3

File tree

1 file changed

+3
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-2
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ impl Step for ToolBuild {
196196
Kind::Build,
197197
self.mode,
198198
self.tool,
199+
// A stage N tool is built with the stage N-1 compiler.
199200
self.build_compiler.stage + 1,
200201
&self.build_compiler.host,
201202
&self.target,
@@ -366,7 +367,7 @@ pub(crate) fn get_tool_rustc_compiler(
366367
}
367368

368369
/// Determines how to build a `ToolTarget`, i.e. which compiler should be used to compile it.
369-
/// The compiler stage is automatically auto-bumped if we need to cross-compile a stage 1 tool.
370+
/// The compiler stage is automatically bumped if we need to cross-compile a stage 1 tool.
370371
pub enum ToolTargetBuildMode {
371372
/// Build the tool using rustc that corresponds to the selected CLI stage.
372373
Build(TargetSelection),
@@ -399,7 +400,7 @@ pub(crate) fn get_tool_target_compiler(
399400
builder.compiler(build_compiler_stage, builder.host_target)
400401
} else {
401402
// If we are cross-compiling a stage 1 tool, we cannot do that with a stage 0 compiler,
402-
// so we auto-bump the tool's stage to 2.
403+
// so we auto-bump the tool's stage to 2, which means we need a stage 1 compiler.
403404
builder.compiler(build_compiler_stage.max(1), builder.host_target)
404405
};
405406
builder.std(compiler, target);

0 commit comments

Comments
 (0)