about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-12-13 11:05:40 +0900
committerGitHub <noreply@github.com>2020-12-13 11:05:40 +0900
commit54119d443600d01b70c22d5c472aff60f1fee530 (patch)
tree8114f54d30e8080fe8af059a06922b612d3ca08e
parent2b43980ef44fe7394c1e800a0d93e82d05c47555 (diff)
parent9df0348299df0a0ceeefd587700cabea6adc2d53 (diff)
downloadrust-54119d443600d01b70c22d5c472aff60f1fee530.tar.gz
rust-54119d443600d01b70c22d5c472aff60f1fee530.zip
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`
-rw-r--r--src/bootstrap/builder.rs5
-rw-r--r--src/bootstrap/doc.rs5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 6d97943548d..9af79e20630 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -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");
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index a296a1fe3f4..8cacc2512ef 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -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`.