rust/compiler/rustc_codegen_ssa/src
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
..
back Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiser 2024-10-11 15:36:51 +02:00
debuginfo Do not unnecessarily eval consts in codegen 2024-09-20 20:38:11 -04:00
mir compiler: Factor rustc_target::abi out of cg_ssa 2024-10-08 18:24:56 -07:00
traits Auto merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic 2024-09-24 12:07:48 +00:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs Relate binders explicitly, do a leak check too 2024-09-30 12:42:29 -04:00
codegen_attrs.rs Rollup merge of #130308 - davidtwco:tied-target-consolidation, r=wesleywiser 2024-10-10 22:00:45 +02:00
common.rs Clean up formatting. 2024-09-17 16:24:35 +10:00
errors.rs Rollup merge of #130308 - davidtwco:tied-target-consolidation, r=wesleywiser 2024-10-10 22:00:45 +02:00
lib.rs Rename NestedMetaItem to MetaItemInner 2024-10-06 23:28:30 +09:00
meth.rs fix ices on vfe about principal trait 2024-09-23 15:25:52 +08:00
mono_item.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
size_of_val.rs fix ices on vfe about principal trait 2024-09-23 15:25:52 +08:00
target_features.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00