mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
do not allow using local llvm while using rustc from ci
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
3f10032eb0
commit
a7aa7fdd12
@ -50,7 +50,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" { "if-unchanged" } else { false }
|
||||
#download-ci-llvm = if rust.channel == "dev" || rust.download-rustc != false { "if-unchanged" } else { false }
|
||||
|
||||
# Indicates whether the LLVM build is a Release or Debug build
|
||||
#optimize = true
|
||||
|
@ -2483,9 +2483,20 @@ impl Config {
|
||||
llvm::is_ci_llvm_available(self, asserts)
|
||||
}
|
||||
};
|
||||
|
||||
match download_ci_llvm {
|
||||
None => self.channel == "dev" && if_unchanged(),
|
||||
Some(StringOrBool::Bool(b)) => b,
|
||||
None => {
|
||||
(self.channel == "dev" || self.download_rustc_commit.is_some()) && if_unchanged()
|
||||
}
|
||||
Some(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`."
|
||||
);
|
||||
}
|
||||
|
||||
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" => {
|
||||
|
Loading…
Reference in New Issue
Block a user