diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index d30532ef3c6..3c9a154da9a 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -595,7 +595,7 @@ impl Step for Rustdoc { features.push("jemalloc".to_string()); } - let cargo = prepare_tool_cargo( + let mut cargo = prepare_tool_cargo( builder, build_compiler, Mode::ToolRustc, @@ -606,6 +606,10 @@ impl Step for Rustdoc { features.as_slice(), ); + if builder.config.rustc_parallel { + cargo.rustflag("--cfg=parallel_compiler"); + } + let msg = tooling_output( Mode::ToolRustc, "rustdoc",