diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-01-30 11:39:19 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-01-31 23:11:14 +0100 |
| commit | 397eb4f237b92f77eadf12c0bea7cfea5a31a92a (patch) | |
| tree | eb83d2343232e767210eb6e1c3e3a28b435d8447 /src/bootstrap/bin | |
| parent | 65440a3f4fe42acbe9970638b567ee3fa68d4824 (diff) | |
| download | rust-397eb4f237b92f77eadf12c0bea7cfea5a31a92a.tar.gz rust-397eb4f237b92f77eadf12c0bea7cfea5a31a92a.zip | |
Add missing generation for test and proc_macro, remove old macro redirection
Diffstat (limited to 'src/bootstrap/bin')
| -rw-r--r-- | src/bootstrap/bin/rustdoc.rs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index dec74e60c71..aeb15821b0b 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -16,6 +16,7 @@ fn main() { let libdir = env::var_os("RUSTDOC_LIBDIR").expect("RUSTDOC_LIBDIR was not set"); let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set"); let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set"); + let mut has_unstable = false; use std::str::FromStr; @@ -54,9 +55,22 @@ fn main() { // 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); + if !has_unstable { + cmd.arg("-Z") + .arg("unstable-options"); + } + cmd.arg("--crate-version").arg(version); + has_unstable = true; + } + + // Needed to be able to run all rustdoc tests. + if let Some(_) = env::var_os("RUSTDOC_GENERATE_REDIRECT_PAGES") { + // This "unstable-options" can be removed when `--generate-redirect-pages` is stabilized + if !has_unstable { + cmd.arg("-Z") + .arg("unstable-options"); + } + cmd.arg("--generate-redirect-pages"); } if verbose > 1 { |
