about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-08-23 16:53:21 +0200
committerUrgau <urgau@numericable.fr>2024-09-06 17:49:45 +0200
commit5f367bbbd251b8cfb898f4d5711c9244888b1852 (patch)
treea1f1ab9e2e4d31d3dd01bb268aeab933ec09ed08 /src/bootstrap
parent17b322fa69eed7216dccc9f097eb68237cf62234 (diff)
downloadrust-5f367bbbd251b8cfb898f4d5711c9244888b1852.tar.gz
rust-5f367bbbd251b8cfb898f4d5711c9244888b1852.zip
Make `download-ci-llvm = true` check if CI llvm is available
and make it the default for the compiler profile, as to prevent
unnecessarily checking out `src/llvm-project` with `"if-unchanged"`.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/defaults/config.compiler.toml3
-rw-r--r--src/bootstrap/src/core/config/config.rs3
-rw-r--r--src/bootstrap/src/utils/change_tracker.rs5
3 files changed, 9 insertions, 2 deletions
diff --git a/src/bootstrap/defaults/config.compiler.toml b/src/bootstrap/defaults/config.compiler.toml
index 789586b58f7..147939d2047 100644
--- a/src/bootstrap/defaults/config.compiler.toml
+++ b/src/bootstrap/defaults/config.compiler.toml
@@ -27,4 +27,5 @@ assertions = false
 # Enable warnings during the LLVM compilation (when LLVM is changed, causing a compilation)
 enable-warnings = true
 # Will download LLVM from CI if available on your platform.
-download-ci-llvm = "if-unchanged"
+# If you intend to modify `src/llvm-project`, use `"if-unchanged"` or `false` instead.
+download-ci-llvm = true
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 52c1c462788..2edf6d38508 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -2781,7 +2781,8 @@ impl Config {
                     );
                 }
 
-                b
+                // If download-ci-llvm=true we also want to check that CI llvm is available
+                b && llvm::is_ci_llvm_available(self, asserts)
             }
             Some(StringOrBool::String(s)) if s == "if-unchanged" => if_unchanged(),
             Some(StringOrBool::String(other)) => {
diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs
index 80ab09881fe..99bcc6e0787 100644
--- a/src/bootstrap/src/utils/change_tracker.rs
+++ b/src/bootstrap/src/utils/change_tracker.rs
@@ -250,4 +250,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
         severity: ChangeSeverity::Info,
         summary: "New option `llvm.enzyme` to control whether the llvm based autodiff tool (Enzyme) is built.",
     },
+    ChangeInfo {
+        change_id: 129473,
+        severity: ChangeSeverity::Warning,
+        summary: "`download-ci-llvm = true` now checks if CI llvm is available and has become the default for the compiler profile",
+    },
 ];