Skip to content

Commit fd470e5

Browse files
committed
Adapt llvm-has-rust-patches validation to take llvm-config into account.
1 parent 5f40394 commit fd470e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1810,10 +1810,9 @@ impl Config {
18101810
target.llvm_config = Some(config.src.join(s));
18111811
}
18121812
if let Some(patches) = cfg.llvm_has_rust_patches {
1813-
assert_eq!(
1814-
config.submodules,
1815-
Some(false),
1816-
"cannot set `llvm-has-rust-patches` for a managed submodule (set `build.submodules = false` if you want to apply patches)"
1813+
assert!(
1814+
config.submodules == Some(false) || cfg.llvm_config.is_some(),
1815+
"use of `llvm-has-rust-patches` is restricted to cases where either submodules are disabled or llvm-config been provided"
18171816
);
18181817
target.llvm_has_rust_patches = Some(patches);
18191818
}

0 commit comments

Comments
 (0)