Skip to content

Commit 9fed172

Browse files
committed
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"`.
1 parent a60a9e5 commit 9fed172

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Diff for: config.example.toml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
# Unless you're developing for a target where Rust CI doesn't build a compiler
4343
# toolchain or changing LLVM locally, you probably want to leave this enabled.
4444
#
45+
# Set this to `"true"` to download if CI llvm available otherwise it builds
46+
# from `src/llvm-project`.
47+
#
4548
# Set this to `"if-unchanged"` to download only if the llvm-project has not
4649
# been modified. You can also use this if you are unsure whether you're on a
4750
# tier 1 target. All tier 1 targets are currently supported.

Diff for: src/bootstrap/defaults/config.compiler.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ assertions = false
2727
# Enable warnings during the LLVM compilation (when LLVM is changed, causing a compilation)
2828
enable-warnings = true
2929
# Will download LLVM from CI if available on your platform.
30-
download-ci-llvm = "if-unchanged"
30+
# If you intend to modify `src/llvm-project`, use `download-ci-llvm = "if-unchanged"` or `download-ci-llvm = false` instead.
31+
download-ci-llvm = true

Diff for: src/bootstrap/src/core/config/config.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,8 @@ impl Config {
27602760
);
27612761
}
27622762

2763-
b
2763+
// If download-ci-llvm=true we also want to check that CI llvm is available
2764+
b && llvm::is_ci_llvm_available(self, asserts)
27642765
}
27652766
Some(StringOrBool::String(s)) if s == "if-unchanged" => if_unchanged(),
27662767
Some(StringOrBool::String(other)) => {

Diff for: src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
230230
severity: ChangeSeverity::Warning,
231231
summary: "./x test --rustc-args was renamed to --compiletest-rustc-args as it only applies there. ./x miri --rustc-args was also removed.",
232232
},
233+
ChangeInfo {
234+
change_id: 129473,
235+
severity: ChangeSeverity::Warning,
236+
summary: "`download-ci-llvm = true` now checks if CI llvm is available and has become the default for the compiler profile",
237+
},
233238
];

0 commit comments

Comments
 (0)