Skip to content

Commit d780721

Browse files
committed
fix llvm_out to find the correct LLVM root
When `download-ci-llvm` is enabled, llvm_out 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 <[email protected]>
1 parent 4a2fe44 commit d780721

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ impl Build {
801801
/// Note that if LLVM is configured externally then the directory returned
802802
/// will likely be empty.
803803
fn llvm_out(&self, target: TargetSelection) -> PathBuf {
804-
self.out.join(&*target.triple).join("llvm")
804+
let dir = if self.config.llvm_from_ci { "ci-llvm" } else { "llvm" };
805+
self.out.join(&*target.triple).join(dir)
805806
}
806807

807808
fn lld_out(&self, target: TargetSelection) -> PathBuf {

0 commit comments

Comments
 (0)