-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: Allow building individual crates #95503
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot label -S-waiting-on-review +S-block |
@rustbot label: -S-waiting-on-review +S-blocked |
While working on rust-lang#95503, I realized that this will interfere with existing command lines: Currently people run `x build library/std` expecting it to be added to the sysroot, but after that change, it will *only* build `libstd` without making it available for the toolchain. It's debatable whether that's a breaking change that will be accepted; if so, this PR is absolutely necessary to make sure there's a command for "build the standard library and add it to the sysroot". Even if not, though, I think `x build library` is more clear about what actually happens than the current `x build library/std`. For consistency, also add support for `compiler` and all other command variants. Note that `doc compiler` was already supported, so in a sense this is just fixing an existing inconsistency. I plan to change the dev-guide and various instructions in the README to `build library` once this is merged.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #95502) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot label -S-blocked +S-waiting-on-author |
ad422a4
to
6160535
Compare
6160535
to
fa5eea9
Compare
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
fa5eea9
to
b9c80d1
Compare
This comment has been minimized.
This comment has been minimized.
b9c80d1
to
46bb494
Compare
This comment has been minimized.
This comment has been minimized.
…lacrum Respect --color when building rustbuild itself Separated out from rust-lang#95503.
45bfe46
to
e4c236f
Compare
Got tired of copy-pasting impls and switched the cache to using generics. I know you've mentioned in the past we should emphasize readability over being concise, but I think the new code is honestly easier to read than trying to see the differences between the old impls. |
I'll split this into a separate commit to make it easier to review, I didn't realize how big the diff was. |
e4c236f
to
d50583e
Compare
This makes it much simpler to add new interned types, rather than having to add 4+ impl blocks for each type.
- Add `Interned<Vec<String>>` and use it for tail args - Refactor `cache.rs` not to need a separate impl for each internable type
d50583e
to
d0011b0
Compare
@bors r+ |
📌 Commit d0011b0 has been approved by |
…laumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#95503 (bootstrap: Allow building individual crates) - rust-lang#96814 (Fix repr(align) enum handling) - rust-lang#98256 (Fix whitespace handling after where clause) - rust-lang#98880 (Proper macOS libLLVM symlink when cross compiling) - rust-lang#98944 (Edit `rustc_mir_dataflow::framework::lattice::FlatSet` docs) - rust-lang#98951 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Since rust-lang/rust#95503, `library/std` means "build just std and its dependencies"; to get the old behavior that built `proc_macro` and `test`, you need `x build library`. - Update `library/std` to `library` - Remove the `-i` suggestions; `incremental = true` is already the default for most profiles, in which case `-i` does nothing. If you don't have incremental enabled, I still think suggesting `-i` is bad idea, because it's easy to forget once, at which point you'll end up rebuilding the whole compiler / standard library. - Remove a few repetitive sections and don't discuss incremental in such detail Incremental works well enough that it should "just work" for most people; I don't think it needs multiple paragraphs of explanation so early in the guide. - Clarify that `test library/std` *only* tests libstd in a few places
Since rust-lang/rust#95503, `library/std` means "build just std and its dependencies"; to get the old behavior that built `proc_macro` and `test`, you need `x build library`. - Update `library/std` to `library` - Remove the `-i` suggestions; `incremental = true` is already the default for most profiles, in which case `-i` does nothing. If you don't have incremental enabled, I still think suggesting `-i` is bad idea, because it's easy to forget once, at which point you'll end up rebuilding the whole compiler / standard library. - Remove a few repetitive sections and don't discuss incremental in such detail Incremental works well enough that it should "just work" for most people; I don't think it needs multiple paragraphs of explanation so early in the guide. - Clarify that `test library/std` *only* tests libstd in a few places
This aims to be as unintrusive as possible, but did still require adding a new
tail_args
field to allRustc
andStd
steps.New library and compiler crates are added to the sysroot as they are built, since it's useful to have e.g. just alloc and not std.
Fixes #44293.