Skip to content

Commit

Permalink
Adapt llvm-has-rust-patches validation to take llvm-config into a…
Browse files Browse the repository at this point in the history
…ccount.
  • Loading branch information
TimNN committed Feb 10, 2024
1 parent 5f40394 commit fd470e5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,10 +1810,9 @@ impl Config {
target.llvm_config = Some(config.src.join(s));
}
if let Some(patches) = cfg.llvm_has_rust_patches {
assert_eq!(
config.submodules,
Some(false),
"cannot set `llvm-has-rust-patches` for a managed submodule (set `build.submodules = false` if you want to apply patches)"
assert!(
config.submodules == Some(false) || cfg.llvm_config.is_some(),
"use of `llvm-has-rust-patches` is restricted to cases where either submodules are disabled or llvm-config been provided"
);
target.llvm_has_rust_patches = Some(patches);
}
Expand Down

0 comments on commit fd470e5

Please sign in to comment.