about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2020-08-14 14:50:18 -0700
committerEric Huss <eric@huss.org>2020-08-14 14:50:18 -0700
commit73b7a0403235732daa0664bfd1bd3279b7ab5cb6 (patch)
treee700874aafeba6e1d5271605d46fae070e21ab8e
parent8e21bd0633b8d970646ee6eb706c9e8acfad19af (diff)
downloadrust-73b7a0403235732daa0664bfd1bd3279b7ab5cb6.tar.gz
rust-73b7a0403235732daa0664bfd1bd3279b7ab5cb6.zip
Fix crate-version with rustdoc in bootstrap.
-rw-r--r--src/bootstrap/bin/rustdoc.rs6
-rw-r--r--src/bootstrap/builder.rs3
-rw-r--r--src/bootstrap/test.rs1
3 files changed, 1 insertions, 9 deletions
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 8c56cf1cb34..ab846adf942 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -48,12 +48,6 @@ fn main() {
         cmd.arg(arg);
     }
 
-    // Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
-    // it up so we can make rustdoc print this into the docs
-    if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
-        cmd.arg("--crate-version").arg(version);
-    }
-
     // Needed to be able to run all rustdoc tests.
     if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
         // This "unstable-options" can be removed when `--resource-suffix` is stabilized
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 4b0905bd6c1..8536569919b 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -745,7 +745,6 @@ impl<'a> Builder<'a> {
             .env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
             .env("CFG_RELEASE_CHANNEL", &self.config.channel)
             .env("RUSTDOC_REAL", self.rustdoc(compiler))
-            .env("RUSTDOC_CRATE_VERSION", self.rust_version())
             .env("RUSTC_BOOTSTRAP", "1")
             .arg("-Winvalid_codeblock_attributes");
         if self.config.deny_warnings {
@@ -1271,7 +1270,7 @@ impl<'a> Builder<'a> {
         }
 
         // For `cargo doc` invocations, make rustdoc print the Rust version into the docs
-        cargo.env("RUSTDOC_CRATE_VERSION", self.rust_version());
+        rustdocflags.arg("--crate-version").arg(&self.rust_version());
 
         // Environment variables *required* throughout the build
         //
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 11e2564305f..ac833a55d4c 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -599,7 +599,6 @@ impl Step for RustdocTheme {
             .env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host))
             .env("CFG_RELEASE_CHANNEL", &builder.config.channel)
             .env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
-            .env("RUSTDOC_CRATE_VERSION", builder.rust_version())
             .env("RUSTC_BOOTSTRAP", "1");
         if let Some(linker) = builder.linker(self.compiler.host, true) {
             cmd.env("RUSTC_TARGET_LINKER", linker);