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 compile time of rustbuild #92297

Merged
merged 5 commits into from
Jan 2, 2022
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Dec 26, 2021

Best reviewed commit by commit. The ignore crate and it's dependencies are probably responsible for the majority of the compile time after this PR.

cc @jyn514 as you got a couple of open rustbuild PR.

@bjorn3 bjorn3 added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 26, 2021
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2021
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2021
@bors
Copy link
Contributor

bors commented Jan 1, 2022

☔ The latest upstream changes (presumably #92465) made this pull request unmergeable. Please resolve the merge conflicts.

Rustbuild already depends on once_cell which in the future can be
replaced with std::lazy::Lazy.
The task of the macro is simple enough that a decl macro is almost ten
times shorter than the original proc macro. The proc macro is 159 lines
while the decl macro is just 18 lines.

This reduces the amount of dependencies of rustbuild from 45 to 37. It
also slight reduces compilation time from 47s to 44s for debug builds.
This slightly improves compilation time by reducing linking time
(saving about a 1/10 of the the total compilation time after
changing rustbuild) and slightly reduces disk usage (from 16MB for
the rustc wrapper to 4MB).
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 1, 2022

Rebased and addressed review comments.

@bjorn3 bjorn3 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 1, 2022
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 1, 2022

Removed some dead code.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 1, 2022

📌 Commit 7ea6e71 has been approved by Mark-Simulacrum

@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 Jan 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#84083 (Clarify the guarantees that ThreadId does and doesn't make.)
 - rust-lang#91593 (Remove unnecessary bounds for some Hash{Map,Set} methods)
 - rust-lang#92297 (Reduce compile time of rustbuild)
 - rust-lang#92332 (Add test for where clause order)
 - rust-lang#92438 (Enforce formatting for rustc_codegen_cranelift)
 - rust-lang#92463 (Remove pronunciation guide from Vec<T>)
 - rust-lang#92468 (Emit an error for `--cfg=)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ab7a356 into rust-lang:master Jan 2, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 2, 2022
@bjorn3 bjorn3 deleted the smaller_bootstrap branch January 2, 2022 09:29
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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants