Remove some env vars for rustdoc invocations.

In an attempt to avoid "thread '<unnamed>' panicked at 'failed to
acquire jobserver token: Bad file descriptor" errors.
This commit is contained in:
Nicholas Nethercote 2018-12-12 16:28:43 +11:00
parent 95a6262df1
commit 209240dc26

View File

@ -684,6 +684,11 @@ impl<'a> Builder<'a> {
.env("RUSTDOC_REAL", self.rustdoc(host))
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
.env("RUSTC_BOOTSTRAP", "1");
// Remove make-related flags that can cause jobserver problems.
cmd.env_remove("MAKEFLAGS");
cmd.env_remove("MFLAGS");
if let Some(linker) = self.linker(host) {
cmd.env("RUSTC_TARGET_LINKER", linker);
}