Auto merge of #117813 - onur-ozkan:simplify-download-ci-llvm-option, r=Mark-Simulacrum
deprecate `if-available` value of `download-ci-llvm` This PR deprecates the use of the `if-available` value for `download-ci-llvm` since `if-unchanged` serves the same purpose when no changes are detected. In cases where changes are present, it is assumed that compiling LLVM is acceptable (otherwise, why make changes there?). This was probably missing in the #110087 issue before. cc `@RalfJung`
This commit is contained in:
commit
ea6b131132
8 changed files with 18 additions and 19 deletions
|
|
@ -17,4 +17,4 @@ lto = "off"
|
|||
|
||||
[llvm]
|
||||
# Will download LLVM from CI if available on your platform.
|
||||
download-ci-llvm = "if-available"
|
||||
download-ci-llvm = "if-unchanged"
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ lto = "off"
|
|||
|
||||
[llvm]
|
||||
# Will download LLVM from CI if available on your platform.
|
||||
download-ci-llvm = "if-available"
|
||||
download-ci-llvm = "if-unchanged"
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ compiler-docs = true
|
|||
|
||||
[llvm]
|
||||
# Will download LLVM from CI if available on your platform.
|
||||
download-ci-llvm = "if-available"
|
||||
download-ci-llvm = "if-unchanged"
|
||||
|
|
|
|||
|
|
@ -2113,6 +2113,8 @@ impl Config {
|
|||
match download_ci_llvm {
|
||||
None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
|
||||
Some(StringOrBool::Bool(b)) => b,
|
||||
// FIXME: "if-available" is deprecated. Remove this block later (around mid 2024)
|
||||
// to not break builds between the recent-to-old checkouts.
|
||||
Some(StringOrBool::String(s)) if s == "if-available" => {
|
||||
llvm::is_ci_llvm_available(&self, asserts)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ fn download_ci_llvm() {
|
|||
}
|
||||
|
||||
let parse_llvm = |s| parse(s).llvm_from_ci;
|
||||
let if_available = parse_llvm("llvm.download-ci-llvm = \"if-available\"");
|
||||
let if_unchanged = parse_llvm("llvm.download-ci-llvm = \"if-unchanged\"");
|
||||
|
||||
assert!(parse_llvm("llvm.download-ci-llvm = true"));
|
||||
assert!(!parse_llvm("llvm.download-ci-llvm = false"));
|
||||
assert_eq!(parse_llvm(""), if_available);
|
||||
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_available);
|
||||
assert_eq!(parse_llvm(""), if_unchanged);
|
||||
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_unchanged);
|
||||
assert!(!parse_llvm("rust.channel = \"stable\""));
|
||||
assert!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""));
|
||||
assert!(parse_llvm(
|
||||
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-available\""
|
||||
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
|
||||
));
|
||||
assert!(!parse_llvm(
|
||||
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\""
|
||||
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue