about summary refs log tree commit diff
path: root/src/bootstrap/bin/rustdoc.rs
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-12-06 09:25:29 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-12-06 09:25:29 +0100
commitacdf83f2288e1b80259dafeca4a0cee9a42973c3 (patch)
treeef7ffe46fee2f0b9f331a206af4a71d23fabe0a1 /src/bootstrap/bin/rustdoc.rs
parentd4c442d65c150b99d18202a5cce4a2cbdbd4dc83 (diff)
downloadrust-acdf83f2288e1b80259dafeca4a0cee9a42973c3.tar.gz
rust-acdf83f2288e1b80259dafeca4a0cee9a42973c3.zip
Update miri to rustc changes
Diffstat (limited to 'src/bootstrap/bin/rustdoc.rs')
-rw-r--r--src/bootstrap/bin/rustdoc.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index d7d72d5dd56..4e975adc972 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -47,6 +47,17 @@ fn main() {
     if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
         cmd.arg("-Z").arg("force-unstable-if-unmarked");
     }
+    if let Some(linker) = env::var_os("RUSTC_TARGET_LINKER") {
+        cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
+    }
+
+    // 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") {
+        // This "unstable-options" can be removed when `--crate-version` is stabilized
+        cmd.arg("-Z").arg("unstable-options")
+           .arg("--crate-version").arg(version);
+    }
 
     std::process::exit(match cmd.status() {
         Ok(s) => s.code().unwrap_or(1),