Skip to content
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

reduce compiler Assemble complexity #134437

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

onur-ozkan
Copy link
Member

compile::Assemble is already complicated by its nature (as it handles core internals like recursive building logic, etc.) and also handles half of LldWrapper tool logic for no good reason since it should be done in the build step directly.

This change moves it there to reduce complexity of compile::Assemble logic.

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2024

r? @Kobzol

rustbot has assigned @Kobzol.
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

@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 Dec 17, 2024
@jieyouxu jieyouxu self-assigned this Dec 17, 2024
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the improve-compiler-build branch 2 times, most recently from 70e8695 to 12aa509 Compare December 17, 2024 19:23
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2024

Some changes occurred in src/tools/cargo

cc @ehuss

@onur-ozkan onur-ozkan force-pushed the improve-compiler-build branch from 12aa509 to a9fe0cd Compare December 17, 2024 19:25
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, one question regarding the compiler stage, but otherwise LGTM.

I tested the changes locally on x86_64-unknown-linux-gnu with rust.lld = true up to stage 2 rustc and ran the resulting rustc with -vV, didn't seem to explode, so AFAICT this is fine.

src/bootstrap/src/core/build_steps/tool.rs Outdated Show resolved Hide resolved
`compile::Assemble` is already complicated by its nature (as it handles core
internals like recursive building logic, etc.) and also handles half of `LldWrapper`
tool logic for no good reason since it should be done in the build step directly.

This change moves it there to reduce complexity of `compile::Assemble` logic.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the improve-compiler-build branch from a9fe0cd to bb1a90f Compare December 18, 2024 18:43
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, you can r=me after PR CI is green.

@onur-ozkan
Copy link
Member Author

@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Dec 18, 2024

📌 Commit bb1a90f has been approved by jieyouxu

It is now in the queue for this repository.

@bors 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 Dec 18, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#133702 (Variants::Single: do not use invalid VariantIdx for uninhabited enums)
 - rust-lang#134427 (ci: remove duplicate task definition)
 - rust-lang#134432 (Fix intra doc links not generated inside footnote definitions)
 - rust-lang#134437 (reduce compiler `Assemble` complexity)
 - rust-lang#134474 (Forbid overwriting types in typeck)
 - rust-lang#134477 (move lint_unused_mut into sub-fn)
 - rust-lang#134491 (Some destructor/drop related tweaks)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cc3053a into rust-lang:master Dec 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2024
Rollup merge of rust-lang#134437 - onur-ozkan:improve-compiler-build, r=jieyouxu

reduce compiler `Assemble` complexity

`compile::Assemble` is already complicated by its nature (as it handles core internals like recursive building logic, etc.) and also handles half of `LldWrapper` tool logic for no good reason since it should be done in the build step directly.

This change moves it there to reduce complexity of `compile::Assemble` logic.
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants