Skip to content

Commit d3848dc

Browse files
committed
fix prebuilt_llvm_config to use the correct LLVM root
When `download-ci-llvm` is enabled, `prebuilt_llvm_config` ends up with the error below due to an incorrect path on cross-compilations. This change fixes that. failed to execute command: "/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version" ERROR: No such file or directory (os error 2) Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 4a2fe44 commit d3848dc

File tree

1 file changed

+6
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-1
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ pub fn prebuilt_llvm_config(
9797
let root = "src/llvm-project/llvm";
9898
let out_dir = builder.llvm_out(target);
9999

100-
let mut llvm_config_ret_dir = builder.llvm_out(builder.config.build);
100+
let mut llvm_config_ret_dir = if builder.config.llvm_from_ci {
101+
builder.config.ci_llvm_root()
102+
} else {
103+
builder.llvm_out(builder.config.build)
104+
};
105+
101106
if !builder.config.build.is_msvc() || builder.ninja() {
102107
llvm_config_ret_dir.push("build");
103108
}

0 commit comments

Comments
 (0)