rust/compiler/rustc_session
Osama Abdelkader e67d502d4e Fix autodiff incorrectly applying fat-lto to proc-macro crates
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 <osama.abdelkader@gmail.com>
2025-10-17 16:52:55 +03:00
..
src Fix autodiff incorrectly applying fat-lto to proc-macro crates 2025-10-17 16:52:55 +03:00
Cargo.toml Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00
messages.ftl Migrate BuiltinLintDiag::UnexpectedBuiltinCfg to use LintDiagnostic directly 2025-08-22 02:01:01 -07:00