Skip to content

Commit 63c4a2a

Browse files
committed
do not allow using local llvm while using rustc from ci
Signed-off-by: onur-ozkan <[email protected]>
1 parent 3f10032 commit 63c4a2a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/bootstrap/src/core/config/config.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ impl Config {
17871787
download_ci_llvm,
17881788
build_config,
17891789
} = llvm;
1790+
17901791
match ccache {
17911792
Some(StringOrBool::String(ref s)) => config.ccache = Some(s.to_string()),
17921793
Some(StringOrBool::Bool(true)) => {
@@ -2483,9 +2484,18 @@ impl Config {
24832484
llvm::is_ci_llvm_available(self, asserts)
24842485
}
24852486
};
2487+
24862488
match download_ci_llvm {
24872489
None => self.channel == "dev" && if_unchanged(),
2488-
Some(StringOrBool::Bool(b)) => b,
2490+
Some(StringOrBool::Bool(b)) => {
2491+
if !b && self.download_rustc_commit.is_some() {
2492+
panic!(
2493+
"`llvm.download-ci-llvm` cannot be set to `false` if `rust.download-rustc` is set to `true` or `if-unchanged`."
2494+
);
2495+
}
2496+
2497+
b
2498+
}
24892499
// FIXME: "if-available" is deprecated. Remove this block later (around mid 2024)
24902500
// to not break builds between the recent-to-old checkouts.
24912501
Some(StringOrBool::String(s)) if s == "if-available" => {

0 commit comments

Comments
 (0)