Rollup merge of #40852 - ollie27:rustbuild_compiler_docs, r=alexcrichton
rustbuild: Fix compiler docs again The docs need to be built with the rustbuild feature so the correct stability attributes (rustc_private) get applied. r? @alexcrichton
This commit is contained in:
commit
700e2ea0c2
1 changed files with 8 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue