blob: 9774d4e407eee01839463458b5f2d805afcc4a53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
Respect app-alternatives/ninja (n2 is not yet in the tree) and
user variables from the ninja-utils eclass.
This is a workaround. A proper implementation similar to
the LTO implementation (c6f429) should allow the build system to be set at
configure time.
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/build/ninja_gen/src/build.rs
+++ b/build/ninja_gen/src/build.rs
@@ -49,7 +49,7 @@ impl Build {
output_text: Default::default(),
action_names: Default::default(),
groups: Default::default(),
- have_n2: which::which("n2").is_ok(),
+ have_n2: false,
};
build.add_action("build:configure", ConfigureBuild {})?;
--- a/build/runner/src/build.rs
+++ b/build/runner/src/build.rs
@@ -56,6 +56,11 @@ pub fn run_build(args: BuildArgs) {
let start_time = Instant::now();
let mut command = Command::new(get_ninja_command());
+
+ if env::var("NINJA_VERBOSE").unwrap_or(String::from("ON")).eq("ON") {
+ command.arg("-v");
+ }
+
command
.arg("-f")
.arg(&build_file)
@@ -112,11 +117,7 @@ pub fn run_build(args: BuildArgs) {
}
fn get_ninja_command() -> &'static str {
- if which::which("n2").is_ok() {
- "n2"
- } else {
- "ninja"
- }
+ "ninja"
}
fn setup_build_root() -> Utf8PathBuf {
|