Skip to content

Conversation

Hayden602
Copy link

@Hayden602 Hayden602 commented Sep 12, 2025

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Sep 12, 2025

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot 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 Sep 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 12, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Hayden602
Copy link
Author

r? @SparrowLii @Kobzol
Hi,I’ve finished handling the issue regarding enabling parallel front end in bootstrap. Please help review if it looks appropriate. Thank you.

@rustbot rustbot assigned SparrowLii and unassigned clubby789 Sep 12, 2025
Copy link
Member

@Kobzol Kobzol left a 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?

View changes since this review

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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`).

Copy link
Member

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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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

Copy link
Member

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
Copy link
Member

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"

@fmease fmease changed the title Add parallel-frontend-threads to bootstrap.toml and enable multi-thre… Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants