Skip to content

Commit a22af69

Browse files
Remove MAKEFLAGS to prevent accidental inheritance
1 parent 1ae3cff commit a22af69

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/bootstrap/builder.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,10 @@ impl<'a> Builder<'a> {
584584
cargo.env("RUST_CHECK", "1");
585585
}
586586

587-
// If we were invoked from `make` then that's already got a jobserver
588-
// set up for us so no need to tell Cargo about jobs all over again.
589-
if env::var_os("MAKEFLAGS").is_none() && env::var_os("MFLAGS").is_none() {
590-
cargo.arg("-j").arg(self.jobs().to_string());
591-
}
587+
cargo.arg("-j").arg(self.jobs().to_string());
588+
// Remove make-related flags to ensure Cargo can correctly set things up
589+
cargo.env_remove("MAKEFLAGS");
590+
cargo.env_remove("MFLAGS");
592591

593592
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
594593
// Force cargo to output binaries with disambiguating hashes in the name

0 commit comments

Comments
 (0)