about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-07-11 00:33:51 +0200
committerGitHub <noreply@github.com>2022-07-11 00:33:51 +0200
commit7cd617490de8e4443b854bd32624bd40e0e2eed0 (patch)
treee193bba697a616e77cd660660254c83e3ab7b1b1
parent582bec4dcfc29ce4859ff3f5d6905d108449dab2 (diff)
parent6245d725a251325f29902656ac3ca5adb4c51f2a (diff)
downloadrust-7cd617490de8e4443b854bd32624bd40e0e2eed0.tar.gz
rust-7cd617490de8e4443b854bd32624bd40e0e2eed0.zip
Rollup merge of #99128 - oxalica:fix/ci-llvm-patchelf, r=jyn514
Fix `download-ci-llvm` NixOS patching for binaries

LLVM tools should also be patched, since they are used in some tests, specially,
- src/test/run-make-fulldeps/cross-lang-lto (llvm-ar)
- src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs (llvm-ar)
- src/test/run-make-fulldeps/issue-64153 (llvm-objdump)

To be more future proof, we should patch all binaries in `bin`, which is done in this PR.
-rw-r--r--src/bootstrap/native.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 7ddd0ba5c3d..8254f01ce87 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -147,8 +147,8 @@ pub(crate) fn maybe_download_ci_llvm(builder: &Builder<'_>) {
     let key = format!("{}{}", llvm_sha, config.llvm_assertions);
     if program_out_of_date(&llvm_stamp, &key) && !config.dry_run {
         download_ci_llvm(builder, &llvm_sha);
-        for binary in ["llvm-config", "FileCheck"] {
-            builder.fix_bin_or_dylib(&llvm_root.join("bin").join(binary));
+        for entry in t!(fs::read_dir(llvm_root.join("bin"))) {
+            builder.fix_bin_or_dylib(&t!(entry).path());
         }
 
         // Update the timestamp of llvm-config to force rustc_llvm to be