Adapt llvm-has-rust-patches
validation to take llvm-config
into account.
This commit is contained in:
parent
5f40394baa
commit
fd470e58c2
@ -1810,10 +1810,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
|
|||||||
target.llvm_config = Some(config.src.join(s));
|
target.llvm_config = Some(config.src.join(s));
|
||||||
}
|
}
|
||||||
if let Some(patches) = cfg.llvm_has_rust_patches {
|
if let Some(patches) = cfg.llvm_has_rust_patches {
|
||||||
assert_eq!(
|
assert!(
|
||||||
config.submodules,
|
config.submodules == Some(false) || cfg.llvm_config.is_some(),
|
||||||
Some(false),
|
"use of `llvm-has-rust-patches` is restricted to cases where either submodules are disabled or llvm-config been provided"
|
||||||
"cannot set `llvm-has-rust-patches` for a managed submodule (set `build.submodules = false` if you want to apply patches)"
|
|
||||||
);
|
);
|
||||||
target.llvm_has_rust_patches = Some(patches);
|
target.llvm_has_rust_patches = Some(patches);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user