-
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
fix(opt-dist): respect existing config.toml #125473
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
This is marked as draft because I am still fighting with Nix configurations for LLVM PGO and haven't fully tested it 😬. |
191ba65
to
395024a
Compare
FYI, if you comment out this and do a try build, it will run the post-optimization tests. |
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.
r? @Kobzol
Feel free to r=me if a try build with tests passes.
395024a
to
159ccd4
Compare
@bors try |
…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
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
|
I can try to make it work, if desired. |
to be clear, that's in bootstrap, not in opt-dist |
Yeah I am aware. Cargo also merges target specific configs (in a quirky way 😆). Let me see if bootstrap can do a similar thing in a separate PR. |
…onur-ozkan bootstrap: support target specific config overrides Can't find any previous discussion about not supporting this, so I get it done. The motivation of this is from <rust-lang#125473 (comment)>.
…ur-ozkan bootstrap: support target specific config overrides Can't find any previous discussion about not supporting this, so I get it done. The motivation of this is from <rust-lang#125473 (comment)>.
…ur-ozkan bootstrap: support target specific config overrides Can't find any previous discussion about not supporting this, so I get it done. The motivation of this is from <rust-lang#125473 (comment)>.
@bors try |
…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
☀️ Try build successful - checks-actions |
Some changes occurred in src/tools/opt-dist cc @Kobzol |
@rust-timer build f94950d |
This comment has been minimized.
This comment has been minimized.
Oh no forgot to remove the commit |
This is another step toward making opt-dist work in sandboxed environments 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
159ccd4
to
c81a40b
Compare
Finished benchmarking commit (f94950d): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.899s -> 672.687s (0.27%) |
Thanks for implementing the bootstrap change! @bors r+ rollup |
…toml, r=Kobzol 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 7 pull requests Successful merges: - rust-lang#125307 (tidy: stop special-casing tests/ui entry limit) - rust-lang#125375 (Create a triagebot ping group for Rust for Linux) - rust-lang#125473 (fix(opt-dist): respect existing config.toml) - rust-lang#125508 (Stop SRoA'ing `DynMetadata` in MIR) - rust-lang#125530 (cleanup dependence of `ExtCtxt` in transcribe when macro expansion) - rust-lang#125544 (Also mention my-self for other check-cfg docs changes) - rust-lang#125559 (Simplify the `unchecked_sh[lr]` ub-checks a bit) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#125307 (tidy: stop special-casing tests/ui entry limit) - rust-lang#125375 (Create a triagebot ping group for Rust for Linux) - rust-lang#125473 (fix(opt-dist): respect existing config.toml) - rust-lang#125508 (Stop SRoA'ing `DynMetadata` in MIR) - rust-lang#125561 (Stabilize `slice_flatten`) - rust-lang#125571 (f32: use constants instead of reassigning a dummy value as PI) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125473 - weihanglo:respect-existing-config-toml, r=Kobzol 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
bootstrap: support target specific config overrides Can't find any previous discussion about not supporting this, so I get it done. The motivation of this is from <rust-lang/rust#125473 (comment)>.
bootstrap: support target specific config overrides Can't find any previous discussion about not supporting this, so I get it done. The motivation of this is from <rust-lang/rust#125473 (comment)>.
This is another step toward making opt-dist work in sandboxed environments. See also #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>
tooverride paths to rustc / cargo / llvm-config.
Footnotes
https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77 ↩
https://github.com/rust-lang/rust/blob/8679004993f08807289911d9f400f4ac4391d2bc/src/bootstrap/bootstrap.py#L1057 ↩