-
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
Respect CARGOFLAGS in bootstrap.py #111979
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
labels
May 26, 2023
Thanks for the PR! Would be great to have a test at some point |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
May 30, 2023
do you have ideas for how to test this? maybe |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
May 31, 2023
Respect CARGOFLAGS in bootstrap.py This makes it possible to pass flags to bootstrap itself, for consistency with std/rustc: https://github.com/rust-lang/rust/blob/04265621f9a82cfc2fc2278b935dcc5d4a1c39b7/src/bootstrap/builder.rs#L1446-L1447 Like RUSTFLAGS, this doesn't support CARGOFLAGS_BOOTSTRAP: https://github.com/rust-lang/rust/blob/6674dcda7a1da4c66e0aa0cfc67b27e42f4ebb34/src/bootstrap/bootstrap.py#L883-L884 I found this useful recently when I wanted to pass `-Zsparse-registry` to an old checkout of the compiler from before it was stabilized in cargo.
This was referenced May 31, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
May 31, 2023
Respect CARGOFLAGS in bootstrap.py This makes it possible to pass flags to bootstrap itself, for consistency with std/rustc: https://github.com/rust-lang/rust/blob/04265621f9a82cfc2fc2278b935dcc5d4a1c39b7/src/bootstrap/builder.rs#L1446-L1447 Like RUSTFLAGS, this doesn't support CARGOFLAGS_BOOTSTRAP: https://github.com/rust-lang/rust/blob/6674dcda7a1da4c66e0aa0cfc67b27e42f4ebb34/src/bootstrap/bootstrap.py#L883-L884 I found this useful recently when I wanted to pass `-Zsparse-registry` to an old checkout of the compiler from before it was stabilized in cargo.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 31, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#111772 (Fix linkage for large binaries on mips64 platforms) - rust-lang#111975 (Stop normalizing so many different prefixes) - rust-lang#111979 (Respect CARGOFLAGS in bootstrap.py) - rust-lang#112089 (Add `--warnings warn` flag to `x.py`) - rust-lang#112103 (Bootstrap update to 1.71 beta) r? `@ghost` `@rustbot` modify labels: rollup
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this pull request
Jun 25, 2023
…larsan68 Test the cargo args generated by bootstrap.py I recommend reviewing this commit-by-commit using the instructions in https://rustc-dev-guide.rust-lang.org/git.html#moving-large-sections-of-code. - Test cargo arguments passed by bootstrap.py This moves a lot of code around, but the logic itself is not too terribly complicated. - Move almost all logic in `def bootstrap` to the `RustBuild` class, to avoid mixing setting configuration with running commands - Update various doctests to the new (more complete) RustBuild config. In particular, don't pretend that `bin_root` supports `build` being unset. - Change `parse_args` not to use a global, to allow testing it - Set BUILD_DIR appropriately so bootstrap.py doesn't panic because cargo isn't found - Allow passing arguments to `bootstrap_test.py` Previous, it used the built-in test runner, which doesn't support options unless they're manually passed in the script. - Fix progress messages for configure in bootstrap_test.py Before it would unconditionally print `configure-args = []`. r? `@albertlarsan68` cc rust-lang#112089 rust-lang#111979 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes it possible to pass flags to bootstrap itself, for consistency with std/rustc:
rust/src/bootstrap/builder.rs
Lines 1446 to 1447 in 0426562
Like RUSTFLAGS, this doesn't support CARGOFLAGS_BOOTSTRAP:
rust/src/bootstrap/bootstrap.py
Lines 883 to 884 in 6674dcd
I found this useful recently when I wanted to pass
-Zsparse-registry
to an old checkout of the compiler from before it was stabilized in cargo.