diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-03-25 22:01:19 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-03-26 22:29:30 +0100 |
| commit | 50c50e3a82e80dcc31f366b81c491fd0bf8ed5ac (patch) | |
| tree | 648b9dcffbea6f44e44de35aedaf95c092b23d6a | |
| parent | 2d6745de0e4c6c8f304982e812ce40c50b813d6f (diff) | |
| download | rust-50c50e3a82e80dcc31f366b81c491fd0bf8ed5ac.tar.gz rust-50c50e3a82e80dcc31f366b81c491fd0bf8ed5ac.zip | |
Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc build
| -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 085f243785c..1c9f6e1ab28 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -69,6 +69,17 @@ fn main() { .arg("unstable-options"); } cmd.arg("--generate-redirect-pages"); + has_unstable = true; + } + + // 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 + if !has_unstable { + cmd.arg("-Z") + .arg("unstable-options"); + } + cmd.arg("--resource-suffix").arg(x); } if verbose > 1 { |
