mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #19540 - servo:style-features, r=emilio
Check that 'style' is compiled in a supported configuration. Provide an explanatory error message when the compilation would fail because of missing or duplicate items. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19540) <!-- Reviewable:end -->
This commit is contained in:
commit
29d960ee5c
1 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue