diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 4b2d3e9ab4b75..63a4a206ebc88 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -97,7 +97,12 @@ pub fn prebuilt_llvm_config( let root = "src/llvm-project/llvm"; let out_dir = builder.llvm_out(target); - let mut llvm_config_ret_dir = builder.llvm_out(builder.config.build); + let mut llvm_config_ret_dir = if builder.config.llvm_from_ci { + builder.config.ci_llvm_root() + } else { + builder.llvm_out(builder.config.build) + }; + if !builder.config.build.is_msvc() || builder.ninja() { llvm_config_ret_dir.push("build"); }