Skip to content

Commit 2db56c6

Browse files
GuillaumeGomezpietroalbini
authored andcommitted
Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc build
1 parent 5c8705d commit 2db56c6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/bootstrap/bin/rustdoc.rs

+11
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ fn main() {
6969
.arg("unstable-options");
7070
}
7171
cmd.arg("--generate-redirect-pages");
72+
has_unstable = true;
73+
}
74+
75+
// Needed to be able to run all rustdoc tests.
76+
if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
77+
// This "unstable-options" can be removed when `--resource-suffix` is stabilized
78+
if !has_unstable {
79+
cmd.arg("-Z")
80+
.arg("unstable-options");
81+
}
82+
cmd.arg("--resource-suffix").arg(x);
7283
}
7384

7485
if verbose > 1 {

0 commit comments

Comments
 (0)