From 809eec5a79e9d29d73d0e49fc6631db04f7db93a Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 24 Jan 2023 14:38:57 +0100 Subject: [PATCH] Enable --cfg=parallel_compiler in rustdoc. --- src/bootstrap/tool.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 9a2100c2fb785..728677ae764f7 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -551,7 +551,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, @@ -562,6 +562,10 @@ impl Step for Rustdoc { features.as_slice(), ); + if builder.config.rustc_parallel { + cargo.rustflag("--cfg=parallel_compiler"); + } + builder.info(&format!( "Building rustdoc for stage{} ({})", target_compiler.stage, target_compiler.host