Don't restrict docs in compiler-docs mode
This commit is contained in:
parent
d2c795932b
commit
af00927a8b
@ -151,17 +151,25 @@ pub fn std(build: &Build, stage: u32, target: &str) {
|
|||||||
let mut cargo = build.cargo(&compiler, Mode::Libstd, target, "doc");
|
let mut cargo = build.cargo(&compiler, Mode::Libstd, target, "doc");
|
||||||
cargo.arg("--manifest-path")
|
cargo.arg("--manifest-path")
|
||||||
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
|
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
|
||||||
.arg("--features").arg(build.std_features())
|
.arg("--features").arg(build.std_features());
|
||||||
.arg("--no-deps");
|
|
||||||
|
|
||||||
for krate in &["alloc", "collections", "core", "std", "std_unicode"] {
|
// We don't want to build docs for internal std dependencies unless
|
||||||
cargo.arg("-p").arg(krate);
|
// in compiler-docs mode. When not in that mode, we whitelist the crates
|
||||||
// Create all crate output directories first to make sure rustdoc uses
|
// for which docs must be built.
|
||||||
// relative links.
|
if build.config.compiler_docs {
|
||||||
// FIXME: Cargo should probably do this itself.
|
cargo.arg("-p").arg("std");
|
||||||
t!(fs::create_dir_all(out_dir.join(krate)));
|
} 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
|
||||||
|
// relative links.
|
||||||
|
// FIXME: Cargo should probably do this itself.
|
||||||
|
t!(fs::create_dir_all(out_dir.join(krate)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build.run(&mut cargo);
|
build.run(&mut cargo);
|
||||||
cp_r(&out_dir, &out)
|
cp_r(&out_dir, &out)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user