Skip to content

Commit 9df0348

Browse files
committed
Fix building compiler docs with stage 0
1 parent 39b841d commit 9df0348

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/bootstrap/builder.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,14 @@ impl<'a> Builder<'a> {
732732
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
733733
.env("RUSTDOC_REAL", self.rustdoc(compiler))
734734
.env("RUSTC_BOOTSTRAP", "1")
735-
.arg("-Znormalize_docs")
736735
.arg("-Winvalid_codeblock_attributes");
737736
if self.config.deny_warnings {
738737
cmd.arg("-Dwarnings");
739738
}
739+
// cfg(not(bootstrap)), can be removed on the next beta bump
740+
if compiler.stage != 0 {
741+
cmd.arg("-Znormalize-docs");
742+
}
740743

741744
// Remove make-related flags that can cause jobserver problems.
742745
cmd.env_remove("MAKEFLAGS");

src/bootstrap/doc.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,10 @@ impl Step for Rustc {
527527
cargo.rustdocflag("--document-private-items");
528528
cargo.rustdocflag("--enable-index-page");
529529
cargo.rustdocflag("-Zunstable-options");
530-
cargo.rustdocflag("-Znormalize-docs");
530+
// cfg(not(bootstrap)), can be removed on the next beta bump
531+
if stage != 0 {
532+
cargo.rustdocflag("-Znormalize-docs");
533+
}
531534
compile::rustc_cargo(builder, &mut cargo, target);
532535

533536
// Only include compiler crates, no dependencies of those, such as `libc`.

0 commit comments

Comments
 (0)