about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-10-17 13:08:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-10-18 07:01:29 -0700
commit3541ffb668c3b908aa5e3b6ba8a890d56a8360a7 (patch)
treee6b61b7c8dedf19f3b4cdfa8ee7fcb6b0d8f518d /src/rustllvm/RustWrapper.cpp
parent0be6863a15f5aacacb287ca490823ab3b7ceb302 (diff)
downloadrust-3541ffb668c3b908aa5e3b6ba8a890d56a8360a7.tar.gz
rust-3541ffb668c3b908aa5e3b6ba8a890d56a8360a7.zip
rustc: Add `_imp_` symbols later in compilation
On MSVC targets rustc will add symbols prefixed with `_imp_` to LLVM modules to
"emulate" dllexported statics as that workaround is still in place after #27438
hasn't been solved otherwise. These statics, however, were getting gc'd by
ThinLTO accidentally which later would cause linking failures.

This commit updates the location we add such symbols to happen just before
codegen to ensure that (a) they're not eliminated by the optimizer and (b) the
optimizer doesn't even worry about them.

Closes #45347
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions