Skip to content

Commit

Permalink
Rollup merge of rust-lang#79954 - jyn514:normalize-oops, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Fix building compiler docs with stage 0

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

r? `@Mark-Simulacrum`
  • Loading branch information
JohnTitor committed Dec 13, 2020
2 parents 2b43980 + 9df0348 commit 54119d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 54119d4

Please sign in to comment.