From c592eacc63220df01fb08228fc5bc78b75dc1dd1 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Tue, 17 Sep 2024 20:42:21 +0300 Subject: [PATCH] skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/tool.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index a437f829ba5a6..6c3bb694f923e 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -872,8 +872,11 @@ impl Step for LlvmBitcodeLinker { fn run(self, builder: &Builder<'_>) -> PathBuf { let bin_name = "llvm-bitcode-linker"; - builder.ensure(compile::Std::new(self.compiler, self.compiler.host)); - builder.ensure(compile::Rustc::new(self.compiler, self.target)); + // If enabled, use ci-rustc and skip building the in-tree compiler. + if !builder.download_rustc() { + builder.ensure(compile::Std::new(self.compiler, self.compiler.host)); + builder.ensure(compile::Rustc::new(self.compiler, self.target)); + } let cargo = prepare_tool_cargo( builder,