We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 344eb54 + e67d502 commit 9e7909aCopy full SHA for 9e7909a
compiler/rustc_session/src/session.rs
@@ -603,7 +603,8 @@ impl Session {
603
// Autodiff currently requires fat-lto to have access to the llvm-ir of all (indirectly) used functions and types.
604
// fat-lto is the easiest solution to this requirement, but quite expensive.
605
// FIXME(autodiff): Make autodiff also work with embed-bc instead of fat-lto.
606
- if self.opts.autodiff_enabled() {
+ // Don't apply fat-lto to proc-macro crates as they cannot use fat-lto without -Zdylib-lto
607
+ if self.opts.autodiff_enabled() && !self.opts.crate_types.contains(&CrateType::ProcMacro) {
608
return config::Lto::Fat;
609
}
610
0 commit comments