diff options
Diffstat (limited to 'src/bootstrap/bin/rustdoc.rs')
| -rw-r--r-- | src/bootstrap/bin/rustdoc.rs | 11 |
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), |
