Files
rust/compiler/rustc_codegen_llvm
Jonathan Brouwer 1b6842fbd2 Rollup merge of #158723 - AsakuraMizu:windows-msvc-eii, r=bjorn3
Support EII on Windows MSVC

Tracking issue: rust-lang/rust#125418

The previous PR rust-lang/rust#158294 made function EIIs work on Windows MSVC. This PR fixes support for static EIIs, enabling full EII support on Windows MSVC.

The following fixes are included:
- Keep EII statics out of LLVM internalization
- Mark EII static symbols as `dllimport`
- Emit MSVC `__imp_<symbol>` stubs for aliases to static data

Note: `LLVMAddAlias2` was incorrectly declared in the `llvm-wrapper` extern block previously.
2026-07-14 16:49:01 +02: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.