From 9bc9b8857f0098790dc48a740dde307e0210cf89 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Sat, 18 Jul 2020 17:35:01 +0900 Subject: [PATCH] Set the -j flag in make flags on all platforms For some reason, it's only set on Unix, not Windows, but some versions of GNU make will complain about "-jN forced in submake" when _no_ -j flag is given at all, and disable the jobserver mode entirely. --- src/lib.rs | 2 +- src/unix.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d61c70c..b7c9b0a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -294,7 +294,7 @@ impl Client { // Older implementations of make use `--jobserver-fds` and newer // implementations use `--jobserver-auth`, pass both to try to catch // both implementations. - let value = format!("--jobserver-fds={0} --jobserver-auth={0}", arg); + let value = format!("-j --jobserver-fds={0} --jobserver-auth={0}", arg); cmd.env("CARGO_MAKEFLAGS", &value); self.inner.configure(cmd); } diff --git a/src/unix.rs b/src/unix.rs index 7b969ee..837a191 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -184,7 +184,7 @@ impl Client { } pub fn string_arg(&self) -> String { - format!("{},{} -j", self.read.as_raw_fd(), self.write.as_raw_fd()) + format!("{},{}", self.read.as_raw_fd(), self.write.as_raw_fd()) } pub fn configure(&self, cmd: &mut Command) {