rustc: Support --jobs options for limiting parallelism in various parts of the compiler - #159675
Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
| Opt, | ||
| "", | ||
| "jobs-backend", | ||
| "Limit on the number of parallel jobs used by backend", |
There was a problem hiding this comment.
Is this supposed to be respected when a jobserver exists?
There was a problem hiding this comment.
Yes, eventually (right now there's a FIXME about it in write.rs).
jobs_backend is the static upper limit, and the jobserver can limit work further within the 1 ..= jobs_backend range.
|
Why is I don't like the |
I expect a large number of users of
Better naming suggestions are welcome. |
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
All the comments are addressed. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
…arts of the compiler
|
Implementation looks fine. And based on the MCP being accepted, I'm going to assume the CLI is fine too. Can still be adjusted before stabilization if necessary. @bors r+ |
rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler `--jobs-frontend` for the frontend, `--jobs-backend` for the backend, `--jobs-linker` for the linker, and `-j`/`--jobs` for the overall limit. See the added docs for more details. Part of rust-lang/compiler-team#1005. Any suspicious option combinations are prohibited for now. r? @bjorn3 @Zoxc
…uwer Rollup of 21 pull requests Successful merges: - #160100 (Add "system" option to `override-allocator` directive) - #159675 (rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler) - #159999 (Fix invalidation of stdlib in bootstrap when using non-LLVM codegen backends) - #160233 (Bubble bad path error while parsing field to avoid unecessary second error) - #160272 (rustc_metadata: Move native library search code to `rustc_codegen_ssa`) - #154202 (rustfmt: Format `cfg_select!`) - #158835 (rustc_passes: lint unused `#[path]` attributes on inline modules) - #159520 (Suggest `Vec<T>` instead of `[T]`) - #160034 (Move "macro only" check for `#[allow_internal_unsafe/unstable]` to attribute parser) - #160066 (rustc_middle: lint attribute cleanups) - #160085 (Remove various superfluous lint attributes) - #160113 (Coalesce `rustc_on_unimplemented` attributes and lint malformed filters) - #160119 (fix query cycle in `coroutine_hidden_types` for the next solver) - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`) - #160157 (Remove outdated comments from `va_list.rs`) - #160159 (More accurately check for interior mutability in `invalid_reference_casting` lint) - #160208 (rustdoc: Fix crash when trying to list attributes on an opaque type) - #160244 (Rename splat to rustc_splat in error messages) - #160246 (dont fire `unused_mut` on `&pin mut self`) - #160247 (Configure backport nominations for rustfmt) - #160274 (renovate: update lock files weekly)
…uwer Rollup of 22 pull requests Successful merges: - #160100 (Add "system" option to `override-allocator` directive) - #160220 (Refactor: shrink region ext traits) - #159675 (rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler) - #159999 (Fix invalidation of stdlib in bootstrap when using non-LLVM codegen backends) - #160233 (Bubble bad path error while parsing field to avoid unecessary second error) - #160272 (rustc_metadata: Move native library search code to `rustc_codegen_ssa`) - #154202 (rustfmt: Format `cfg_select!`) - #159520 (Suggest `Vec<T>` instead of `[T]`) - #159710 (Add rustdoc/cargo PGO profiles to reproducible artifacts) - #160034 (Move "macro only" check for `#[allow_internal_unsafe/unstable]` to attribute parser) - #160066 (rustc_middle: lint attribute cleanups) - #160085 (Remove various superfluous lint attributes) - #160113 (Coalesce `rustc_on_unimplemented` attributes and lint malformed filters) - #160119 (fix query cycle in `coroutine_hidden_types` for the next solver) - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`) - #160157 (Remove outdated comments from `va_list.rs`) - #160159 (More accurately check for interior mutability in `invalid_reference_casting` lint) - #160208 (rustdoc: Fix crash when trying to list attributes on an opaque type) - #160244 (Rename splat to rustc_splat in error messages) - #160246 (dont fire `unused_mut` on `&pin mut self`) - #160247 (Configure backport nominations for rustfmt) - #160274 (renovate: update lock files weekly)
Rollup merge of #159675 - petrochenkov:jjj, r=bjorn3 rustc: Support `--jobs` options for limiting parallelism in various parts of the compiler `--jobs-frontend` for the frontend, `--jobs-backend` for the backend, `--jobs-linker` for the linker, and `-j`/`--jobs` for the overall limit. See the added docs for more details. Part of rust-lang/compiler-team#1005. Any suspicious option combinations are prohibited for now. r? @bjorn3 @Zoxc
View all comments
--jobs-frontendfor the frontend,--jobs-backendfor the backend,--jobs-linkerfor the linker, and-j/--jobsfor the overall limit.See the added docs for more details.
Part of rust-lang/compiler-team#1005.
Any suspicious option combinations are prohibited for now.
r? @bjorn3 @Zoxc