Skip to content

Commit 028aaa1

Browse files
committed
skip compile::Std and compile::Rustc on forced_compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent cdd8af2 commit 028aaa1

File tree

1 file changed

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

1 file changed

+11
-3
lines changed

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

+11-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,18 @@ impl Step for ToolBuild {
121121

122122
match self.mode {
123123
Mode::ToolRustc => {
124-
builder.ensure(compile::Std::new(self.compiler, self.compiler.host));
125-
builder.ensure(compile::Rustc::new(self.compiler, target));
124+
// If compiler was forced, its artifacts should be prepared earlier.
125+
if !self.compiler.is_forced_compiler() {
126+
builder.ensure(compile::Std::new(self.compiler, self.compiler.host));
127+
builder.ensure(compile::Rustc::new(self.compiler, target));
128+
}
129+
}
130+
Mode::ToolStd => {
131+
// If compiler was forced, its artifacts should be prepared earlier.
132+
if !self.compiler.is_forced_compiler() {
133+
builder.ensure(compile::Std::new(self.compiler, target))
134+
}
126135
}
127-
Mode::ToolStd => builder.ensure(compile::Std::new(self.compiler, target)),
128136
Mode::ToolBootstrap => {} // uses downloaded stage0 compiler libs
129137
_ => panic!("unexpected Mode for tool build"),
130138
}

0 commit comments

Comments
 (0)