Skip to content

Commit 83f203c

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 83f203c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2483,9 +2483,18 @@ impl Config {
24832483
llvm::is_ci_llvm_available(self, asserts)
24842484
}
24852485
};
2486+
24862487
match download_ci_llvm {
24872488
None => self.channel == "dev" && if_unchanged(),
2488-
Some(StringOrBool::Bool(b)) => b,
2489+
Some(StringOrBool::Bool(b)) => {
2490+
if !b && self.download_rustc_commit.is_some() {
2491+
panic!(
2492+
"`llvm.download-ci-llvm` cannot be set to `false` if `rust.download-rustc` is set to `true` or `if-unchanged`."
2493+
);
2494+
}
2495+
2496+
b
2497+
}
24892498
// FIXME: "if-available" is deprecated. Remove this block later (around mid 2024)
24902499
// to not break builds between the recent-to-old checkouts.
24912500
Some(StringOrBool::String(s)) if s == "if-available" => {

0 commit comments

Comments
 (0)