Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustbuild: Copy crate doc files fewer times #64613

Merged
merged 1 commit into from Sep 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bootstrap/doc.rs
Expand Up @@ -476,11 +476,11 @@ impl Step for Std {
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));

builder.run(&mut cargo);
builder.cp_r(&my_out, &out);
};
for krate in &["alloc", "core", "std", "proc_macro", "test"] {
run_cargo_rustdoc_for(krate);
}
builder.cp_r(&my_out, &out);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid this copy entirely by instead symlinking rustdoc's outdir to out (the final location)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't strictly tested the symlink, but I wanted to land some easy wins first and start investigating deeper wins later. I believe symlinks won't work because everything attempts to preserve symlinks, and rust-installer wants to actually archive the symlink, which would cause invalid tarballs since we wouldn't actually distribute docs.

I'm working on rust-installer now though so I'll try to plumb this through eventually, ideally I don't want to have to copy documentation anywhere.

}
}

Expand Down