Skip to content

Omit stdarch test crates from the rust-src component #94907

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

Merged
merged 1 commit into from
Mar 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Omit stdarch test crates from the rust-src component
These crates aren't necessary for building the standard library. This
saves 30MB of disk space.

Fixes #94906
bjorn3 committed Mar 13, 2022
commit cd5e75a691f68167df16b6a98fafcbc41d4afd57
5 changes: 5 additions & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
@@ -821,6 +821,11 @@ impl Step for Src {
// not needed and contains symlinks which rustup currently
// chokes on when unpacking.
"library/backtrace/crates",
// these are 30MB combined and aren't necessary for building
// the standard library.
"library/stdarch/crates/Cargo.toml",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should have been

"library/stdarch/Cargo.toml",

I think. In Rust 1.61.0, rust-src includes src/rust/library/stdarch/Cargo.toml, which includes

[workspace]
members = [
  "crates/stdarch-verify"

This didn't show up when testing with -Zbuild-std since the standard list of crates to include when building std does not include stdarch, but it will show up if a user explicitly requests stdarch. Or, perhaps more importantly, because of #95736, many editors (like IntelliJ) won't treat the root of rust-src as a workspace, and will instead recurse into all the sub-crates directly, which then includes stdarch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, my bad.

Copy link
Contributor

Choose a reason for hiding this comment

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

I filed #97228 with a fix 👍

"library/stdarch/crates/stdarch-verify",
"library/stdarch/crates/intrinsic-test",
],
&dst_src,
);