Skip to content

Commit b6c97c3

Browse files
committed
Auto merge of #38858 - ollie27:rustbuild_docs_std, r=alexcrichton
rustbuild: Stop building docs for std dependancies Fixes: #38319 r? @alexcrichton
2 parents 25bfc8a + 6b96ece commit b6c97c3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/bootstrap/doc.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,16 @@ pub fn std(build: &Build, stage: u32, target: &str) {
152152
cargo.arg("--manifest-path")
153153
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
154154
.arg("--features").arg(build.std_features())
155-
.arg("-p").arg("std");
155+
.arg("--no-deps");
156+
157+
for krate in &["alloc", "collections", "core", "std", "std_unicode"] {
158+
cargo.arg("-p").arg(krate);
159+
// Create all crate output directories first to make sure rustdoc uses
160+
// relative links.
161+
// FIXME: Cargo should probably do this itself.
162+
t!(fs::create_dir_all(out_dir.join(krate)));
163+
}
164+
156165
build.run(&mut cargo);
157166
cp_r(&out_dir, &out)
158167
}

0 commit comments

Comments
 (0)