Auto merge of #130529 - onur-ozkan:better-ci-llvm-default, r=Kobzol
change `download-ci-llvm` default from `if-unchanged` to `true` Since https://github.com/rust-lang/rust/pull/129473 and https://github.com/rust-lang/rust/pull/130202, using `download-ci-llvm=true` is now the better default and it also fixes #130515.
This commit is contained in:
commit
13a5097796
@ -53,7 +53,7 @@
|
||||
#
|
||||
# Note that many of the LLVM options are not currently supported for
|
||||
# downloading. Currently only the "assertions" option can be toggled.
|
||||
#download-ci-llvm = if rust.channel == "dev" || rust.download-rustc != false { "if-unchanged" } else { false }
|
||||
#download-ci-llvm = true
|
||||
|
||||
# Indicates whether the LLVM build is a Release or Debug build
|
||||
#optimize = true
|
||||
|
@ -2738,6 +2738,8 @@ fn parse_download_ci_llvm(
|
||||
download_ci_llvm: Option<StringOrBool>,
|
||||
asserts: bool,
|
||||
) -> bool {
|
||||
let download_ci_llvm = download_ci_llvm.unwrap_or(StringOrBool::Bool(true));
|
||||
|
||||
let if_unchanged = || {
|
||||
if self.rust_info.is_from_tarball() {
|
||||
// Git is needed for running "if-unchanged" logic.
|
||||
@ -2761,10 +2763,7 @@ fn parse_download_ci_llvm(
|
||||
};
|
||||
|
||||
match download_ci_llvm {
|
||||
None => {
|
||||
(self.channel == "dev" || self.download_rustc_commit.is_some()) && if_unchanged()
|
||||
}
|
||||
Some(StringOrBool::Bool(b)) => {
|
||||
StringOrBool::Bool(b) => {
|
||||
if !b && self.download_rustc_commit.is_some() {
|
||||
panic!(
|
||||
"`llvm.download-ci-llvm` cannot be set to `false` if `rust.download-rustc` is set to `true` or `if-unchanged`."
|
||||
@ -2774,8 +2773,8 @@ fn parse_download_ci_llvm(
|
||||
// If download-ci-llvm=true we also want to check that CI llvm is available
|
||||
b && llvm::is_ci_llvm_available(self, asserts)
|
||||
}
|
||||
Some(StringOrBool::String(s)) if s == "if-unchanged" => if_unchanged(),
|
||||
Some(StringOrBool::String(other)) => {
|
||||
StringOrBool::String(s) if s == "if-unchanged" => if_unchanged(),
|
||||
StringOrBool::String(other) => {
|
||||
panic!("unrecognized option for download-ci-llvm: {:?}", other)
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ fn download_ci_llvm() {
|
||||
assert!(!parse_llvm("llvm.download-ci-llvm = false"));
|
||||
assert_eq!(parse_llvm(""), if_unchanged);
|
||||
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_unchanged);
|
||||
assert!(!parse_llvm("rust.channel = \"stable\""));
|
||||
assert!(parse_llvm("rust.channel = \"stable\""));
|
||||
assert_eq!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""), if_unchanged);
|
||||
assert_eq!(
|
||||
parse_llvm(
|
||||
|
@ -265,4 +265,9 @@ pub fn human_readable_changes(changes: &[ChangeInfo]) -> String {
|
||||
severity: ChangeSeverity::Info,
|
||||
summary: "New option `dist.vendor` added to control whether bootstrap should vendor dependencies for dist tarball.",
|
||||
},
|
||||
ChangeInfo {
|
||||
change_id: 130529,
|
||||
severity: ChangeSeverity::Info,
|
||||
summary: "If `llvm.download-ci-llvm` is not defined, it defaults to `true`.",
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user