about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-20 10:06:51 +0100
committerJakub Beránek <berykubik@gmail.com>2025-03-21 12:18:50 +0100
commitf53acd17cb172c02bd8ec24aadd4475579ee0b3c (patch)
treef226e9703638aad628a5e4a38f229b18560862b0
parent68aaa8d103f8d17dc9fc721a80ceb45d2ec9585d (diff)
downloadrust-f53acd17cb172c02bd8ec24aadd4475579ee0b3c.tar.gz
rust-f53acd17cb172c02bd8ec24aadd4475579ee0b3c.zip
Set `if-unchanged` as the default value for `download-ci-llvm` when we're on CI.
-rw-r--r--src/bootstrap/src/core/config/config.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index b8068373c73..ffa3c2ddb6d 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -3097,7 +3097,14 @@ impl Config {
         download_ci_llvm: Option<StringOrBool>,
         asserts: bool,
     ) -> bool {
-        let download_ci_llvm = download_ci_llvm.unwrap_or(StringOrBool::Bool(true));
+        // We don't ever want to use `true` on CI, as we should not
+        // download upstream artifacts if there are any local modifications.
+        let default = if self.is_running_on_ci {
+            StringOrBool::String("if-unchanged".to_string())
+        } else {
+            StringOrBool::Bool(true)
+        };
+        let download_ci_llvm = download_ci_llvm.unwrap_or(default);
 
         let if_unchanged = || {
             if self.rust_info.is_from_tarball() {