about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-21 15:48:53 +0100
committerGitHub <noreply@github.com>2025-03-21 15:48:53 +0100
commita8f0c6bbcb231b4d8a2299ca09bbb243c64efeb8 (patch)
tree4f3d1cecab5cda3601a3908afff7872f2bb2f918 /src
parentc354a97bd99a046df14ab18509a0d6a665eeed2a (diff)
parentb77590c1176839b127fe1f20b4557267d26d91a7 (diff)
downloadrust-a8f0c6bbcb231b4d8a2299ca09bbb243c64efeb8.tar.gz
rust-a8f0c6bbcb231b4d8a2299ca09bbb243c64efeb8.zip
Rollup merge of #138623 - daltenty:daltenty/fix-compiler-rt, r=Kobzol
[bootstrap] Use llvm_runtimes for compiler-rt

Trying to enable `compiler-rt` via `LLVM_ENABLE_PROJECTS` is no longer a supported option in LLVM, and gives you nasty warnings:
```
Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a
  fatal error in the LLVM 21 release.  Please use
  -DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at
  https://compiler-rt.llvm.org/ for building the runtimes.
```

try-job: aarch64-gnu-debug
try-job: x86_64-gnu-debug
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/llvm.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
index 0ae5256a18f..79d07efd310 100644
--- a/src/bootstrap/src/core/build_steps/llvm.rs
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
@@ -479,7 +479,6 @@ impl Step for Llvm {
 
         if helpers::forcing_clang_based_tests() {
             enabled_llvm_projects.push("clang");
-            enabled_llvm_projects.push("compiler-rt");
         }
 
         if builder.config.llvm_polly {
@@ -502,6 +501,10 @@ impl Step for Llvm {
 
         let mut enabled_llvm_runtimes = Vec::new();
 
+        if helpers::forcing_clang_based_tests() {
+            enabled_llvm_runtimes.push("compiler-rt");
+        }
+
         if builder.config.llvm_offload {
             enabled_llvm_runtimes.push("offload");
             //FIXME(ZuseZ4): LLVM intends to drop the offload dependency on openmp.