rust/compiler/rustc_codegen_ssa/src/back
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
..
rpath Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
archive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
command.rs Minimize visibilities. 2024-09-17 16:24:33 +10:00
link.rs Fix hardcoded strip path when cross-compiling from Linux to Darwin 2024-10-10 04:03:48 +02:00
linker.rs Avoid redundant -Wl,-dylib flag when linking 2024-10-10 03:51:11 +02:00
lto.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
metadata.rs Do not specify an SDK version in object files 2024-09-29 14:45:09 +02:00
mod.rs Minimize visibilities. 2024-09-17 16:24:33 +10:00
rpath.rs Minimize visibilities. 2024-09-17 16:24:33 +10:00
symbol_export.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
write.rs Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiser 2024-10-11 15:36:51 +02:00