Fix building compiler docs with stage 0

This commit is contained in:
Joshua Nelson 2020-12-11 20:27:28 -05:00
parent 39b841dfe3
commit 9df0348299
2 changed files with 8 additions and 2 deletions

View file

@ -732,11 +732,14 @@ impl<'a> Builder<'a> {
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
.env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTC_BOOTSTRAP", "1")
.arg("-Znormalize_docs")
.arg("-Winvalid_codeblock_attributes");
if self.config.deny_warnings {
cmd.arg("-Dwarnings");
}
// cfg(not(bootstrap)), can be removed on the next beta bump
if compiler.stage != 0 {
cmd.arg("-Znormalize-docs");
}
// Remove make-related flags that can cause jobserver problems.
cmd.env_remove("MAKEFLAGS");

View file

@ -527,7 +527,10 @@ impl Step for Rustc {
cargo.rustdocflag("--document-private-items");
cargo.rustdocflag("--enable-index-page");
cargo.rustdocflag("-Zunstable-options");
cargo.rustdocflag("-Znormalize-docs");
// cfg(not(bootstrap)), can be removed on the next beta bump
if stage != 0 {
cargo.rustdocflag("-Znormalize-docs");
}
compile::rustc_cargo(builder, &mut cargo, target);
// Only include compiler crates, no dependencies of those, such as `libc`.