From 9e4b3d6bc4dc9c3d5bbf65511212791fa32666ac Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Wed, 5 Mar 2025 09:26:25 +0300 Subject: [PATCH] handle forced compiler in `get_tool_rustc_compiler` Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/tool.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index 39acb646dff4..e86bf02e9c3d 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -299,6 +299,8 @@ pub(crate) fn get_tool_rustc_compiler( if builder.download_rustc() && target_compiler.stage == 1 { // We already have the stage 1 compiler, we don't need to cut the stage. builder.compiler(target_compiler.stage, builder.config.build) + } else if target_compiler.is_forced_compiler() { + target_compiler } else { // Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise // we'd have stageN/bin/rustc and stageN/bin/$rustc_tool be effectively different stage