зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19540 - Check that 'style' is compiled in a supported configuration (from servo:style-features); r=emilio
Provide an explanatory error message when the compilation would fail because of missing or duplicate items. Source-Repo: https://github.com/servo/servo Source-Revision: 29d960ee5c043ba87ec0da565b5d61979a8a9b78 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 938036878f0738eb87e98a6f70a0f031d465b240
This commit is contained in:
Родитель
cd742d7638
Коммит
0a48e0345b
|
@ -94,6 +94,15 @@ fn generate_properties() {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let gecko = cfg!(feature = "gecko");
|
||||
let servo = cfg!(feature = "servo");
|
||||
if !(gecko || servo) {
|
||||
panic!("The style crate requires enabling one of its 'servo' or 'gecko' feature flags");
|
||||
}
|
||||
if gecko && servo {
|
||||
panic!("The style crate does not support enabling both its 'servo' or 'gecko' \
|
||||
feature flags at the same time.");
|
||||
}
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:out_dir={}", env::var("OUT_DIR").unwrap());
|
||||
generate_properties();
|
||||
|
|
Загрузка…
Ссылка в новой задаче