-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc: Flag metadata compatible with multiple CGUs #60270
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!
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
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. |
@bors r+ rollup |
📌 Commit 955f283 has been approved by |
…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!
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
It looks like the
OutputType::Metadata
kind 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 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!