Auto merge of #38929 - Manishearth:compiler-docs, r=alexcrichton

Don't restrict docs in compiler-docs mode

Search is broken without this. We want all crates to be included in compiler-docs mode. This was changed in https://github.com/rust-lang/rust/pull/38858, this PR brings that functionality back in compiler-docs mode.
This commit is contained in:
bors 2017-01-09 10:58:08 +00:00
commit 7ef1a69d2e

View File

@ -151,9 +151,15 @@ pub fn std(build: &Build, stage: u32, target: &str) {
let mut cargo = build.cargo(&compiler, Mode::Libstd, target, "doc");
cargo.arg("--manifest-path")
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
.arg("--features").arg(build.std_features())
.arg("--no-deps");
.arg("--features").arg(build.std_features());
// We don't want to build docs for internal std dependencies unless
// in compiler-docs mode. When not in that mode, we whitelist the crates
// for which docs must be built.
if build.config.compiler_docs {
cargo.arg("-p").arg("std");
} else {
cargo.arg("--no-deps");
for krate in &["alloc", "collections", "core", "std", "std_unicode"] {
cargo.arg("-p").arg(krate);
// Create all crate output directories first to make sure rustdoc uses
@ -161,6 +167,8 @@ pub fn std(build: &Build, stage: u32, target: &str) {
// FIXME: Cargo should probably do this itself.
t!(fs::create_dir_all(out_dir.join(krate)));
}
}
build.run(&mut cargo);
cp_r(&out_dir, &out)