diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-08 11:37:52 -0800 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2017-01-08 20:31:10 -0800 |
| commit | af00927a8bba04fb4e0a5cc141211d2837f28d03 (patch) | |
| tree | ee485728ce90c3b532b977b728c3fcdddcb8ea90 /src/bootstrap | |
| parent | d2c795932b58d910c179236d1070e04e8cb54faf (diff) | |
| download | rust-af00927a8bba04fb4e0a5cc141211d2837f28d03.tar.gz rust-af00927a8bba04fb4e0a5cc141211d2837f28d03.zip | |
Don't restrict docs in compiler-docs mode
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/doc.rs | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 2b063741c07..d1c9918a733 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -151,17 +151,25 @@ 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"); - - 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))); + .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 + // relative links. + // 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) } |
