diff options
| author | bors <bors@rust-lang.org> | 2025-09-20 08:04:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-20 08:04:38 +0000 |
| commit | b00998aaa50a78b1e45fb107a6c0cfd3f1dc44dd (patch) | |
| tree | f8a8f2e73ee758eb10e68b9b7abea40f9417e612 /src | |
| parent | e4b521903b3b1a671e26a70b9475bcff385767e5 (diff) | |
| parent | 4b755141bc297444401397b09995bb2baafb3fc2 (diff) | |
| download | rust-b00998aaa50a78b1e45fb107a6c0cfd3f1dc44dd.tar.gz rust-b00998aaa50a78b1e45fb107a6c0cfd3f1dc44dd.zip | |
Auto merge of #146771 - Kobzol:download-ci-llvm-default-value, r=jieyouxu
Simplify default value of `download-ci-llvm` Just set it to true, rather than having different default values on CI and locally, and then only deny `true` on our own CI, not elsewhere. Closes: https://github.com/rust-lang/rust/issues/146768 r? `@jieyouxu`
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index a97399b3d4a..dd2d5a1fd53 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -2137,15 +2137,7 @@ pub fn parse_download_ci_llvm<'a>( asserts: bool, ) -> bool { let dwn_ctx = dwn_ctx.as_ref(); - - // 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 dwn_ctx.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 download_ci_llvm = download_ci_llvm.unwrap_or(StringOrBool::Bool(true)); let if_unchanged = || { if rust_info.is_from_tarball() { @@ -2177,8 +2169,9 @@ pub fn parse_download_ci_llvm<'a>( ); } - if b && dwn_ctx.is_running_on_ci { - // On CI, we must always rebuild LLVM if there were any modifications to it + #[cfg(not(test))] + if b && dwn_ctx.is_running_on_ci && CiEnv::is_rust_lang_managed_ci_job() { + // On rust-lang CI, we must always rebuild LLVM if there were any modifications to it panic!( "`llvm.download-ci-llvm` cannot be set to `true` on CI. Use `if-unchanged` instead." ); |
