-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrap: vendor crates required by opt-dist to collect profiles #125465
Conversation
rustbot has assigned @albertlarsan68. Use |
r? @Mark-Simulacrum as you reviewed the previous two PRs. |
bootstrap: vendor crates required by opt-dist to collect profiles These are the default package set required by opt-dist to correctly work, hence for people wanting to build a production grade of rustc in a sandboxed / air-gapped environment, these need to be vendored. The size of `rustc-src-nightly.tar.xz` before and after this change: * Before: 298M * After: 323M (+8%) Size change might or might not be a concern. See the previous discussion: rust-lang#125166 (comment) Previous efforts on making: * rust-lang#125125 * rust-lang#125166 --- Note that extra works still need to be done to make it fully vendored. * The current pinned rustc-perf uses `tempfile::Tempdir` as the working directory when collecting profiles from some of these packages. This "tmp" working directory usage make it impossible for Cargo to pick up the correct vendor sources setting in `.cargo/config.toml` bundled in the rustc-src tarball. [^1] * opt-dist verifies the final built rustc against a subset of rustc test suite. However it rolls out its own `config.toml` without setting `vendor = true`, and that results in `./vendor/` directory removed. [^2] [^1]: https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173 [^2]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77
…ml, r=<try> fix(opt-dist): respect existing config.toml This is another step toward making opt-dist work in sandboxed environments. See also <rust-lang#125465>. opt-dist verifies the final built rustc against a subset of rustc test suite. However it overwrote the pre-existing `config.toml` [^1], and that results in ./vendor/ directory removed [^2]. Instead of overwriting, this patch use `--set <config-value>` to override paths to rustc / cargo / llvm-config. [^1]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77 [^2]: https://github.com/rust-lang/rust/blob/8679004993f08807289911d9f400f4ac4391d2bc/src/bootstrap/bootstrap.py#L1057
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#125455 (Make `clamp` inline) - rust-lang#125465 (bootstrap: vendor crates required by opt-dist to collect profiles ) - rust-lang#125477 (Run rustfmt on files that need it.) - rust-lang#125481 (Fix the dead link in the bootstrap README) - rust-lang#125482 (Notify kobzol after changes to `opt-dist`) - rust-lang#125489 (Revert problematic opaque type change) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#125455 (Make `clamp` inline) - rust-lang#125465 (bootstrap: vendor crates required by opt-dist to collect profiles ) - rust-lang#125477 (Run rustfmt on files that need it.) - rust-lang#125481 (Fix the dead link in the bootstrap README) - rust-lang#125482 (Notify kobzol after changes to `opt-dist`) - rust-lang#125489 (Revert problematic opaque type change) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
That seems unlikely, that failure looks like a spurious network error. It happened even before bootstrap was invoked, and in a builder that doesn't even do |
@bors r+ |
Maybe add them to tidy's license check too? Without this PR they can't be added as the license check needs deps to be either vendored or internet access to be allowed and internet access is not allowed in all contexts where tidy runs. And it makes sense to me to run the license checker on everything we ship in either binary or source form to avoid surprises. |
Does tidy check the licenses of all the dependencies and crates that we vendor? E.g. all dependencies of |
For |
I'm not sure about the licensing part, but the rest looks good to me. Have you tried to do a vendored build of (Big thanks for pushing all these changes through, btw! It's great to provide the optimized workflow for more people that build their own compiler). |
@Kobzol yes. I ran
opt-dist local with linux-ci args) |
Awesome :) |
@Mark-Simulacrum I think the license and git source issues have been resolved. Would you mind reviewing this? We're vendoring |
Nightly probably already branched, but I'll take a look on the weekend and maybe nominate for beta backport depending on details. |
r=me with nits fixed
I think given the changes here I'm not currently inclined to backport it. |
These are the default package set required by opt-dist to correctly work, hence for people wanting to build a production grade of rustc in a sandboxed / air-gapped environment, these need to be vendored. The size of `rustc-src-nightly.tar.xz` before and after this change: * Before: 298M * After: 323M (+8%) These crates are the default set of packages required by opt-dist to correctly work, hence for people wanting to build a production grade of rustc in an sandboxed / air-gapped environment, these need to be vendored. The size of `rustc-src-nightly.tar.xz` before and after this change: * Before: 298M * After: 323M (+8%) Size change might or might not be a concern. See the previous discussion: rust-lang#125166 (comment) Previous efforts on making: * rust-lang#125125 * rust-lang#125166 --- Note that extra works still need to be done to make it fully vendored. * The current pinned rustc-perf uses `tempfile::Tempdir` as the working directory when collecting profiles from some of these packages. This "tmp" working directory usage make it impossible for Cargo to pick up the correct vendor sources setting in `.cargo/config.toml` bundled in the rustc-src tarball. [^1] * opt-dist verifies the final built rustc against a subset of rustc test suite. However it rolls out its own `config.toml` without setting `vendor = true`, and that results in `./vendor/` directory removed. [^2] [^1]: https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173 [^2]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77
`ring` is included because it is an optional dependency of `hyper`, which is a training data in rustc-pref for optimized build. The license of it is generally `ISC AND MIT AND OpenSSL`, though the `package.license` field is not set. See briansmith/ring#902 `git+https://github.com/rust-lang/team` git source is from `rust_team_data`, which is used by `site` in src/tools/rustc-perf. This doesn't really a part of the compiler, so doesn't really affect the bootstrapping process. See rust-lang/rustc-perf#1914.
6799ee1
to
3778703
Compare
nits are fixed, and the CI is all green now. Thanks for the review people. @bors r=Mark-Simulacrum |
…Simulacrum bootstrap: vendor crates required by opt-dist to collect profiles These are the default package set required by opt-dist to correctly work, hence for people wanting to build a production grade of rustc in a sandboxed / air-gapped environment, these need to be vendored. The size of `rustc-src-nightly.tar.xz` before and after this change: * Before: 298M * After: 323M (+8%) Size change might or might not be a concern. See the previous discussion: rust-lang#125166 (comment) Previous efforts on making: * rust-lang#125125 * rust-lang#125166 --- Note that extra works still need to be done to make it fully vendored. * The current pinned rustc-perf uses `tempfile::Tempdir` as the working directory when collecting profiles from some of these packages. This "tmp" working directory usage make it impossible for Cargo to pick up the correct vendor sources setting in `.cargo/config.toml` bundled in the rustc-src tarball. [^1] * opt-dist verifies the final built rustc against a subset of rustc test suite. However it rolls out its own `config.toml` without setting `vendor = true`, and that results in `./vendor/` directory removed. [^2] [^1]: https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173 [^2]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77
Rollup of 6 pull requests Successful merges: - rust-lang#125041 (Enable GVN for `AggregateKind::RawPtr`) - rust-lang#125253 (Add `FRAC_1_SQRT_2PI` constant to f16/f32/f64/f128) - rust-lang#125465 (bootstrap: vendor crates required by opt-dist to collect profiles ) - rust-lang#125470 (Add release notes for 1.79.0) - rust-lang#125963 (Remove hard-coded hashes from codegen tests) - rust-lang#126188 (Fix documentation for `impl_common_helpers` in `run-make-support`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125465 - weihanglo:opt-dist-vendor, r=Mark-Simulacrum bootstrap: vendor crates required by opt-dist to collect profiles These are the default package set required by opt-dist to correctly work, hence for people wanting to build a production grade of rustc in a sandboxed / air-gapped environment, these need to be vendored. The size of `rustc-src-nightly.tar.xz` before and after this change: * Before: 298M * After: 323M (+8%) Size change might or might not be a concern. See the previous discussion: rust-lang#125166 (comment) Previous efforts on making: * rust-lang#125125 * rust-lang#125166 --- Note that extra works still need to be done to make it fully vendored. * The current pinned rustc-perf uses `tempfile::Tempdir` as the working directory when collecting profiles from some of these packages. This "tmp" working directory usage make it impossible for Cargo to pick up the correct vendor sources setting in `.cargo/config.toml` bundled in the rustc-src tarball. [^1] * opt-dist verifies the final built rustc against a subset of rustc test suite. However it rolls out its own `config.toml` without setting `vendor = true`, and that results in `./vendor/` directory removed. [^2] [^1]: https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173 [^2]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77
🎉 |
…r-ozkan Update `rustc-perf` submodule before running tidy Since rust-lang#125465, `tidy` checks `src/tools/rustc-perf`, so we need to have it checked out before running `tidy`. Fixes: rust-lang#126224 r? `@onur-ozkan`
This is needed for fixing the missing license issue. See rust-lang#125465.
These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.
The size of
rustc-src-nightly.tar.xz
before and after this change:Size change might or might not be a concern.
See the previous discussion: #125166 (comment)
Previous efforts on making:
Note that extra works still need to be done to make it fully vendored.
tempfile::Tempdir
as the workingdirectory when collecting profiles from some of these packages.
This "tmp" working directory usage make it impossible for Cargo to pick
up the correct vendor sources setting in
.cargo/config.toml
bundledin the rustc-src tarball. 1
suite. However it rolls out its own
config.toml
without settingvendor = true
, and that results in./vendor/
directory removed.2
Footnotes
https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173 ↩
https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77 ↩