summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/bin/rustdoc.rs6
-rw-r--r--src/bootstrap/builder.rs11
-rw-r--r--src/bootstrap/test.rs1
3 files changed, 7 insertions, 11 deletions
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 8c56cf1..ab846ad 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -48,12 +48,6 @@ fn main() {
48 cmd.arg(arg); 48 cmd.arg(arg);
49 } 49 }
50 50
51 // Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
52 // it up so we can make rustdoc print this into the docs
53 if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
54 cmd.arg("--crate-version").arg(version);
55 }
56
57 // Needed to be able to run all rustdoc tests. 51 // Needed to be able to run all rustdoc tests.
58 if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") { 52 if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
59 // This "unstable-options" can be removed when `--resource-suffix` is stabilized 53 // This "unstable-options" can be removed when `--resource-suffix` is stabilized
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 4b0905b..709b202 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -745,7 +745,6 @@ impl<'a> Builder<'a> {
745 .env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler)) 745 .env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
746 .env("CFG_RELEASE_CHANNEL", &self.config.channel) 746 .env("CFG_RELEASE_CHANNEL", &self.config.channel)
747 .env("RUSTDOC_REAL", self.rustdoc(compiler)) 747 .env("RUSTDOC_REAL", self.rustdoc(compiler))
748 .env("RUSTDOC_CRATE_VERSION", self.rust_version())
749 .env("RUSTC_BOOTSTRAP", "1") 748 .env("RUSTC_BOOTSTRAP", "1")
750 .arg("-Winvalid_codeblock_attributes"); 749 .arg("-Winvalid_codeblock_attributes");
751 if self.config.deny_warnings { 750 if self.config.deny_warnings {
@@ -1271,7 +1270,11 @@ impl<'a> Builder<'a> {
1271 } 1270 }
1272 1271
1273 // For `cargo doc` invocations, make rustdoc print the Rust version into the docs 1272 // For `cargo doc` invocations, make rustdoc print the Rust version into the docs
1274 cargo.env("RUSTDOC_CRATE_VERSION", self.rust_version()); 1273 // This replaces spaces with newlines because RUSTDOCFLAGS does not
1274 // support arguments with regular spaces. Hopefully someday Cargo will
1275 // have space support.
1276 let rust_version = self.rust_version().replace(' ', "\n");
1277 rustdocflags.arg("--crate-version").arg(&rust_version);
1275 1278
1276 // Environment variables *required* throughout the build 1279 // Environment variables *required* throughout the build
1277 // 1280 //
@@ -1448,14 +1451,14 @@ impl Rustflags {
1448 1451
1449 fn env(&mut self, env: &str) { 1452 fn env(&mut self, env: &str) {
1450 if let Ok(s) = env::var(env) { 1453 if let Ok(s) = env::var(env) {
1451 for part in s.split_whitespace() { 1454 for part in s.split(' ') {
1452 self.arg(part); 1455 self.arg(part);
1453 } 1456 }
1454 } 1457 }
1455 } 1458 }
1456 1459
1457 fn arg(&mut self, arg: &str) -> &mut Self { 1460 fn arg(&mut self, arg: &str) -> &mut Self {
1458 assert_eq!(arg.split_whitespace().count(), 1); 1461 assert_eq!(arg.split(' ').count(), 1);
1459 if !self.0.is_empty() { 1462 if !self.0.is_empty() {
1460 self.0.push_str(" "); 1463 self.0.push_str(" ");
1461 } 1464 }
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 11e2564..ac833a5 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -599,7 +599,6 @@ impl Step for RustdocTheme {
599 .env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host)) 599 .env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host))
600 .env("CFG_RELEASE_CHANNEL", &builder.config.channel) 600 .env("CFG_RELEASE_CHANNEL", &builder.config.channel)
601 .env("RUSTDOC_REAL", builder.rustdoc(self.compiler)) 601 .env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
602 .env("RUSTDOC_CRATE_VERSION", builder.rust_version())
603 .env("RUSTC_BOOTSTRAP", "1"); 602 .env("RUSTC_BOOTSTRAP", "1");
604 if let Some(linker) = builder.linker(self.compiler.host, true) { 603 if let Some(linker) = builder.linker(self.compiler.host, true) {
605 cmd.env("RUSTC_TARGET_LINKER", linker); 604 cmd.env("RUSTC_TARGET_LINKER", linker);