Rollup merge of #79954 - jyn514:normalize-oops, r=Mark-Simulacrum

Fix building compiler docs with stage 0

This regressed in https://github.com/rust-lang/rust/pull/79525 (see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Can't.20document.20single.20crate).

r? `@Mark-Simulacrum`
This commit is contained in:
Yuki Okushi 2020-12-13 11:05:40 +09:00 committed by GitHub
commit 54119d4436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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("CFG_RELEASE_CHANNEL", &self.config.channel)
.env("RUSTDOC_REAL", self.rustdoc(compiler)) .env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTC_BOOTSTRAP", "1") .env("RUSTC_BOOTSTRAP", "1")
.arg("-Znormalize_docs")
.arg("-Winvalid_codeblock_attributes"); .arg("-Winvalid_codeblock_attributes");
if self.config.deny_warnings { if self.config.deny_warnings {
cmd.arg("-Dwarnings"); 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. // Remove make-related flags that can cause jobserver problems.
cmd.env_remove("MAKEFLAGS"); cmd.env_remove("MAKEFLAGS");

View File

@ -527,7 +527,10 @@ impl Step for Rustc {
cargo.rustdocflag("--document-private-items"); cargo.rustdocflag("--document-private-items");
cargo.rustdocflag("--enable-index-page"); cargo.rustdocflag("--enable-index-page");
cargo.rustdocflag("-Zunstable-options"); 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); compile::rustc_cargo(builder, &mut cargo, target);
// Only include compiler crates, no dependencies of those, such as `libc`. // Only include compiler crates, no dependencies of those, such as `libc`.