Skip to content

Commit

Permalink
Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc build
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 26, 2019
1 parent 2d6745d commit 50c50e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 50c50e3

Please sign in to comment.