Remove std/test documentation from compiler docs.

This commit is contained in:
David Wood 2018-03-22 20:49:05 +00:00
parent 1b0e9f5af9
commit 73fa6d52ed
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154
2 changed files with 6 additions and 14 deletions

View file

@ -163,7 +163,7 @@ impl Step for RustcDocs {
let image = tmpdir(build).join(format!("{}-{}-image", name, host));
let _ = fs::remove_dir_all(&image);
let dst = image.join("share/doc/rustc/html");
let dst = image.join("share/doc/rust/html");
t!(fs::create_dir_all(&dst));
let src = build.compiler_doc_out(host);
cp_r(&src, &dst);
@ -179,7 +179,7 @@ impl Step for RustcDocs {
.arg(format!("--package-name={}-{}", name, host))
.arg("--component-name=rustc-docs")
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg("--bulk-dirs=share/doc/rustc/html");
.arg("--bulk-dirs=share/doc/rust/html");
build.run(&mut cmd);
t!(fs::remove_dir_all(&image));

View file

@ -690,17 +690,10 @@ impl Step for Rustc {
builder.ensure(compile::Rustc { compiler, target });
let out_dir = build.stage_out(compiler, Mode::Librustc)
.join(target).join("doc");
// See docs in std above for why we symlink
//
// This step must happen after other documentation steps. This
// invariant ensures that compiler documentation is not included
// in the standard documentation tarballs but that all the
// documentation from the standard documentation tarballs is included
// in the compiler documentation tarball.
let my_out = build.crate_doc_out(target);
build.clear_if_dirty(&my_out, &rustdoc);
t!(symlink_dir_force(&my_out, &out_dir));
// We do not symlink to the same shared folder that already contains std library
// documentation from previous steps as we do not want to include that.
build.clear_if_dirty(&out, &rustdoc);
t!(symlink_dir_force(&out, &out_dir));
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "doc");
compile::rustc_cargo(build, &mut cargo);
@ -720,7 +713,6 @@ impl Step for Rustc {
}
build.run(&mut cargo);
cp_r(&my_out, &out);
}
}