From 209240dc267075d69eb8d1dba23be2a8c80c6427 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 12 Dec 2018 16:28:43 +1100 Subject: [PATCH] Remove some env vars for rustdoc invocations. In an attempt to avoid "thread '' panicked at 'failed to acquire jobserver token: Bad file descriptor" errors. --- src/bootstrap/builder.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 7dc64db70b8fc..32f3e573d6845 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -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); }