rust/compiler/rustc_codegen_ssa
Matthias Krüger 7c79621462
Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiser
Create `_imp__` symbols also when doing ThinLTO

When generating a rlib crate on Windows we create `dllimport` / `_imp__` symbols for each global. This effectively makes the rlib contain an import library for itself and allows them to both be dynamically and statically linked. However when doing ThinLTO we do not generate these and thus we end up with missing symbols. Microsoft's `link` can fix these up (and emits warnings), but `lld` seems to currently be unable to.

This PR also does this generation for ThinLTO avoiding those issues with `lld` and also avoids the warnings on `link`.

This is an workaround for https://github.com/rust-lang/rust/issues/81408.

cc `@lqd`
2024-10-11 15:36:51 +02:00
..
src Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiser 2024-10-11 15:36:51 +02:00
Cargo.toml compiler: Factor rustc_target::abi out of cg_ssa 2024-10-08 18:24:56 -07:00
messages.ftl Rollup merge of #130308 - davidtwco:tied-target-consolidation, r=wesleywiser 2024-10-10 22:00:45 +02:00
README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.