rustc: Flag metadata compatible with multiple CGUs#60270
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 28, 2019
Merged
rustc: Flag metadata compatible with multiple CGUs#60270bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
It looks like the `OutputType::Metadata` kind in the compiler was misclassified in rust-lang#38571 long ago by accident as incompatible with codegen units and a single output file. This means that if you emit both a linkable artifact and metadata it silently turns off multiple codegen units unintentionally! This commit corrects the situation to ensure that if `--emit metadata` is used it doesn't implicitly disable multiple codegen units. This will ensure we don't accidentally regress compiler performance when striving to implement pipelined compilation!
Contributor
|
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
Member
Author
|
Note that I haven't written a test here because I can't think of a great way to test this, but if others have suggestions I'm all for adding a test! This was added as a precursor to rust-lang/cargo#6864 where it was discovered that there were funny compiler performance characteristics in the initial testing. |
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit 955f283 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 28, 2019
…oli-obk rustc: Flag metadata compatible with multiple CGUs It looks like the `OutputType::Metadata` kind in the compiler was misclassified in rust-lang#38571 long ago by accident as incompatible with codegen units and a single output file. This means that if you emit both a linkable artifact and metadata it silently turns off multiple codegen units unintentionally! This commit corrects the situation to ensure that if `--emit metadata` is used it doesn't implicitly disable multiple codegen units. This will ensure we don't accidentally regress compiler performance when striving to implement pipelined compilation!
bors
added a commit
that referenced
this pull request
Apr 28, 2019
Rollup of 4 pull requests Successful merges: - #60022 (Document `Item` type in `std::env::SplitPaths` iterator.) - #60270 (rustc: Flag metadata compatible with multiple CGUs) - #60325 (Document ast::ExprKind::Type) - #60347 (Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`) Failed merges: r? @ghost
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It looks like the
OutputType::Metadatakind in the compiler wasmisclassified in #38571 long ago by accident as incompatible with
codegen units and a single output file. This means that if you emit both
a linkable artifact and metadata it silently turns off multiple codegen
units unintentionally!
This commit corrects the situation to ensure that if
--emit metadatais used it doesn't implicitly disable multiple codegen units. This will
ensure we don't accidentally regress compiler performance when striving
to implement pipelined compilation!