diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index db794f6d6c72c70d9908ffb0e08e249f7fbb9dca..e07ffea2a2ee2a07ab76e26fdf4675d97471c314 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -304,6 +304,11 @@ fn run(self, builder: &Builder) -> PathBuf { target, "build", "src/tools/rustdoc"); + + // Most tools don't get debuginfo, but rustdoc should. + cargo.env("RUSTC_DEBUGINFO", builder.config.rust_debuginfo.to_string()) + .env("RUSTC_DEBUGINFO_LINES", builder.config.rust_debuginfo_lines.to_string()); + build.run(&mut cargo); // Cargo adds a number of paths to the dylib search path on windows, which results in // the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"