-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Fix autodiff incorrectly applying fat-lto to proc-macro crates #147792
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
Conversation
rustbot has assigned @petrochenkov. Use |
This comment has been minimized.
This comment has been minimized.
r=me after fixing up the commit message #147792 (comment). |
Reminder, once the PR becomes ready for a review, use |
When -Z autodiff=Enable is used, the compiler automatically enables fat-lto for all crates. However, proc-macro crates cannot use fat-lto without the -Zdylib-lto flag, causing compilation errors. This commit modifies the lto() method in Session to exclude proc-macro crates from fat-lto when autodiff is enabled, while preserving the existing behavior for all other crate types. The fix ensures that: - Non-proc-macro crates still get fat-lto when autodiff is enabled - Proc-macro crates are excluded from fat-lto when autodiff is enabled - Existing autodiff functionality remains unchanged for regular crates Signed-off-by: Osama Abdelkader <[email protected]>
e75f796
to
e67d502
Compare
@rustbot ready. |
@bors r+ |
…-lto, r=petrochenkov Fix autodiff incorrectly applying fat-lto to proc-macro crates Fixes rust-lang#147487
…-lto, r=petrochenkov Fix autodiff incorrectly applying fat-lto to proc-macro crates Fixes rust-lang#147487
Rollup of 7 pull requests Successful merges: - #140153 (Implement `Debug` for `EncodeWide`) - #147454 (Fix backtraces with `-C panic=abort` on qnx; emit unwind tables by default) - #147468 (Implement fs api set_times and set_times_nofollow) - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.) - #147783 (bootstrap: migrate to object 0.37) - #147792 (Fix autodiff incorrectly applying fat-lto to proc-macro crates ) - #147809 (rustdoc: Fix passes order so intra-doc links are collected after stripping passes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - #146509 (Result/Option layout guarantee clarifications) - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.) - #147532 ( Port `#[cfg_attr]` to the new attribute parsing infrastructure) - #147783 (bootstrap: migrate to object 0.37) - #147792 (Fix autodiff incorrectly applying fat-lto to proc-macro crates ) - #147809 (rustdoc: Fix passes order so intra-doc links are collected after stripping passes) Failed merges: - #147813 (Warn on unused_attributes in uitests ) r? `@ghost` `@rustbot` modify labels: rollup
This unfortunately didn't fix the case I posted in the tracking issue, so I reopened it.
|
Fixes #147487