1
Fork 0

Set if-unchanged as the default value for download-ci-llvm when we're on CI.

This commit is contained in:
Jakub Beránek 2025-03-20 10:06:51 +01:00
parent 68aaa8d103
commit f53acd17cb

View file

@ -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() {