mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}
Renaming the variable helped make sure I looked at every use.
This commit is contained in:
parent
f1300bb98b
commit
ddb4e369dd
52 changed files with 870 additions and 469 deletions
|
@ -89,14 +89,19 @@ fn generate_properties() {
|
|||
let script = Path::new(&env::var_os("CARGO_MANIFEST_DIR").unwrap())
|
||||
.join("properties")
|
||||
.join("build.py");
|
||||
let product = if cfg!(feature = "gecko") {
|
||||
"gecko"
|
||||
} else {
|
||||
"servo"
|
||||
};
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
let engine = "gecko";
|
||||
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
let engine = "servo-2013";
|
||||
|
||||
#[cfg(feature = "servo-layout-2020")]
|
||||
let engine = "servo-2020";
|
||||
|
||||
let status = Command::new(&*PYTHON)
|
||||
.arg(&script)
|
||||
.arg(product)
|
||||
.arg(engine)
|
||||
.arg("style-crate")
|
||||
.status()
|
||||
.unwrap();
|
||||
|
@ -117,6 +122,9 @@ fn main() {
|
|||
feature flags at the same time."
|
||||
);
|
||||
}
|
||||
if gecko && (cfg!(feature = "servo-layout-2013") || cfg!(feature = "servo-layout-2020")) {
|
||||
panic!("The 'servo-layout-*' features can only be enabled together with 'servo'.");
|
||||
}
|
||||
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