rust/compiler/rustc_codegen_llvm
Stuart Cook e34ef247cc
Rollup merge of #148855 - ZuseZ4:autodiff-lto-error, r=bjorn3
Error if an autodiff user does not set lto=fat

Based on your feedback, I started to provide a nice error message for a lack of `lto=fat`, instead of us forcing it.

In a next step, we should replace  `RUSTFLAGS="-Zautodiff=Enable"` with another Cargo.toml setting, as discussed here: https://github.com/rust-lang/rust/issues/147487#issuecomment-3446558644

As another improvement, we should also figure out why rlib builds do not properly obey the fat=lto setting.

```````@bjorn3```````
2025-11-17 16:41:02 +11:00
..

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc dev guide.