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

Set -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set. #4234

Merged
merged 1 commit into from
Jun 29, 2017

Conversation

michaelwoerister
Copy link
Member

This PR tweaks compilation for non-path dependencies when CARGO_INCREMENTAL is set. Before, cargo would compile such dependencies "just" non-incrementally while, with this PR, it will also set the number of CGUs to the number of CPU cores. Otherwise compiling those dependencies might take significantly longer (because of more expensive optimizations and less multi-threading) than compiling them incrementally -- which is what we wanted to avoid in the first place.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+

Sounds good to me!

@bors
Copy link
Contributor

bors commented Jun 29, 2017

📌 Commit 3d19b89 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jun 29, 2017

⌛ Testing commit 3d19b89 with merge 5e023a6...

bors added a commit that referenced this pull request Jun 29, 2017
…=alexcrichton

Set -Ccodegen-units=N for non-path dependencies when CARGO_INCREMENTAL is set.

This PR tweaks compilation for non-path dependencies when CARGO_INCREMENTAL is set. Before, `cargo` would compile such dependencies "just" non-incrementally while, with this PR, it will also set the number of CGUs to the number of CPU cores. Otherwise compiling those dependencies might take significantly longer (because of more expensive optimizations and less multi-threading) than compiling them incrementally -- which is what we wanted to avoid in the first place.
@bors
Copy link
Contributor

bors commented Jun 29, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 5e023a6 to master...

@bors bors merged commit 3d19b89 into rust-lang:master Jun 29, 2017
@ehuss ehuss added this to the 1.20.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants