-
Notifications
You must be signed in to change notification settings - Fork 212
Add support for cargo-args=["-Zbuild-std"]
#2107
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
Conversation
-Zbuild-std
cargo-args=["-Zbuild-std"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough about the build-process itself to do a proper review, perhaps @Nemo157 can help here?
From the code, I only had two small comments.
This is blocked on frewsxcv/rust-crates-index#102 (unless we can switch rustwide to |
- Update to a version of rustwide that supports `fetch_build_std_targets` - Don't try to download rust-std for tier 3 targets - Add a local test - Don't try to make API calls to crates.io for local crates This shaves 16 seconds off the build, and also avoids some unnecessary network calls. Note that this calls `cargo fetch -Zbuild-std` unconditionally just because it was easier; I doubt it'll cause any trouble but I can change it if you like.
This is unblocked now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve, the change makes sense to me looking at the code.
I have two caveats:
- is there a build speed impact? ( see comment )
- I don't know much about the build specifics and can't know possible side-effects, perhaps @Nemo157 knows more?
I don't think there should be any bad side effects from this, we don't change the build step at all it's up to the user to pass |
ah hmm, I guess an alternative approach would be to pass
these are dependencies of the standard library - although I suppose infra could vendor them in the rust-src tarball 🤔 |
Update to a version of rustwide that supports
fetch_build_std_targets
Don't try to download rust-std for tier 3 targets
Add a local test
Don't try to make API calls to crates.io for local crates
This shaves 16 seconds off the build, and also avoids some unnecessary network calls.
Note that this calls
cargo fetch -Zbuild-std
unconditionally just because it was easier; I doubt it'll cause any trouble but I can change it if you like.Fixes #1561. Blocked on rust-lang/rustwide#66.