-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation #146458
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
base: master
Are you sure you want to change the base?
Conversation
This PR modifies If appropriate, please update This PR modifies If appropriate, please update |
r? @clubby789 rustbot has assigned @clubby789. Use |
This comment has been minimized.
This comment has been minimized.
009b6b1
to
feed02f
Compare
This comment has been minimized.
This comment has been minimized.
feed02f
to
d4ce225
Compare
This comment has been minimized.
This comment has been minimized.
d4ce225
to
ebc3e15
Compare
…aded parallel compilation
ebc3e15
to
7c0230f
Compare
r? @SparrowLii @Kobzol |
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.
Thanks, looks good! Could you please add an Info
level entry to the change_tracker.rs
file?
@@ -859,6 +859,13 @@ | |||
# Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows | |||
#rust.break-on-ice = true | |||
|
|||
# Set the number of threads used during rustc compilation |
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.
# Set the number of threads used during rustc compilation | |
# Set the number of threads for the compiler frontend used during rustc compilation (passed to `-Zthreads`). |
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.
This change also isn't limited to what is "used during rustc compilation", right? Tools, std, etc will get -Zthreads
as well it seems?
|
||
// Add parallel frontend threads configuration | ||
if let Some(threads) = self.config.rust_parallel_frontend_threads { | ||
rustflags.arg(&format!("-Zthreads={}", threads)); |
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.
rustflags.arg(&format!("-Zthreads={}", threads)); | |
rustflags.arg(&format!("-Zthreads={threads}")); |
@@ -859,6 +859,13 @@ | |||
# Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows | |||
#rust.break-on-ice = true | |||
|
|||
# Set the number of threads used during rustc compilation | |||
# The valid options are: |
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.
# The valid options are: | |
# The valid options are: | |
# 0 - Set the number of threads according to the detected number of threads of the host system |
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.
maybe something like "according to the available parallelism" in the way we document https://doc.rust-lang.org/std/thread/fn.available_parallelism.html?
@@ -859,6 +859,13 @@ | |||
# Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows | |||
#rust.break-on-ice = true | |||
|
|||
# Set the number of threads used during rustc compilation | |||
# The valid options are: | |||
# 1 - Use non-parallel compilation |
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.
that's only in the frontend, so it's not "non-parallel compilation"
No description provided.