@@ -8,9 +8,11 @@ pub fn main() -> std::io::Result<()> {
let crate_root = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
let git_root = crate_root.join("git-src");
let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap());
+ let makeflags = env::var_os("CARGO_MAKEFLAGS").unwrap();
let make_output = make_cmd::gnu_make()
.env("DEVELOPER", "1")
+ .env("MAKEFLAGS", &makeflags)
.env_remove("PROFILE")
.current_dir(git_root.clone())
.args([
@@ -33,6 +35,7 @@ pub fn main() -> std::io::Result<()> {
let make_output = make_cmd::gnu_make()
.env("DEVELOPER", "1")
+ .env("MAKEFLAGS", &makeflags)
.env_remove("PROFILE")
.current_dir(git_root.clone())
.args([
Cargo provides GNU Make flags that can be used to connect to its jobserver for managing parallel builds. They are not automatically passed to any `make` invocations, so let's add that to our build.rs script. Signed-off-by: Josh Steadmon <steadmon@google.com> --- contrib/libgit-sys/build.rs | 3 +++ 1 file changed, 3 insertions(+)