mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add ./mach build --with-layout-2020
… with corresponding `layout` and `layout_thread` crates, which for now do nothing.
This commit is contained in:
parent
c1e9347dee
commit
2b01c26aa5
19 changed files with 186 additions and 12 deletions
|
@ -20,6 +20,8 @@ energy-profiling = ["profile_traits/energy-profiling"]
|
|||
profilemozjs = ["script/profilemozjs"]
|
||||
googlevr = ["webvr/googlevr"]
|
||||
js_backtrace = ["script/js_backtrace"]
|
||||
layout-2013 = ["layout_thread_2013"]
|
||||
layout-2020 = ["layout_thread_2020"]
|
||||
max_log_level = ["log/release_max_level_info"]
|
||||
native-bluetooth = ["bluetooth/native-bluetooth"]
|
||||
no_wgl = ["canvas/no_wgl"]
|
||||
|
@ -53,7 +55,8 @@ gfx = {path = "../gfx"}
|
|||
gleam = "0.6"
|
||||
ipc-channel = "0.11"
|
||||
keyboard-types = "0.4"
|
||||
layout_thread = {path = "../layout_thread"}
|
||||
layout_thread_2013 = {path = "../layout_thread", optional = true}
|
||||
layout_thread_2020 = {path = "../layout_thread_2020", optional = true}
|
||||
log = "0.4"
|
||||
msg = {path = "../msg"}
|
||||
net = {path = "../net"}
|
||||
|
|
20
components/servo/build.rs
Normal file
20
components/servo/build.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
fn main() {
|
||||
let layout_2013 = std::env::var_os("CARGO_FEATURE_LAYOUT_2013").is_some();
|
||||
let layout_2020 = std::env::var_os("CARGO_FEATURE_LAYOUT_2020").is_some();
|
||||
|
||||
if !(layout_2013 || layout_2020) {
|
||||
error("Must enable one of the `layout-2013` or `layout-2020` features.")
|
||||
}
|
||||
if layout_2013 && layout_2020 {
|
||||
error("Must not enable both of the `layout-2013` or `layout-2020` features.")
|
||||
}
|
||||
}
|
||||
|
||||
fn error(message: &str) {
|
||||
print!("\n\n Error: {}\n\n", message);
|
||||
std::process::exit(1)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue