Skip to content

Commit

Permalink
rustbuild: Fix compiler docs again
Browse files Browse the repository at this point in the history
The docs need to be built with the rustbuild feature so the correct
stability attributes (rustc_private) get applied.
  • Loading branch information
ollie27 committed Mar 27, 2017
1 parent ccce2c6 commit 3545fb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ fn main() {
.arg(sysroot)
.env(bootstrap::util::dylib_path_var(),
env::join_paths(&dylib_path).unwrap());

// Pass the `rustbuild` feature flag to crates which rustbuild is
// building. See the comment in bootstrap/lib.rs where this env var is
// set for more details.
if env::var_os("RUSTBUILD_UNSTABLE").is_some() {
cmd.arg("--cfg").arg("rustbuild");
}

std::process::exit(match cmd.status() {
Ok(s) => s.code().unwrap_or(1),
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
Expand Down

0 comments on commit 3545fb5

Please sign in to comment.