Skip to content

Commit 3545fb5

Browse files
committedMar 27, 2017
rustbuild: Fix compiler docs again
The docs need to be built with the rustbuild feature so the correct stability attributes (rustc_private) get applied.
1 parent ccce2c6 commit 3545fb5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/bootstrap/bin/rustdoc.rs

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ fn main() {
4040
.arg(sysroot)
4141
.env(bootstrap::util::dylib_path_var(),
4242
env::join_paths(&dylib_path).unwrap());
43+
44+
// Pass the `rustbuild` feature flag to crates which rustbuild is
45+
// building. See the comment in bootstrap/lib.rs where this env var is
46+
// set for more details.
47+
if env::var_os("RUSTBUILD_UNSTABLE").is_some() {
48+
cmd.arg("--cfg").arg("rustbuild");
49+
}
50+
4351
std::process::exit(match cmd.status() {
4452
Ok(s) => s.code().unwrap_or(1),
4553
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),

0 commit comments

Comments
 (0)
Please sign in to comment.