Skip to content

Commit c8d81f1

Browse files
committed
Apply dllimport in ThinLTO
1 parent 41dd149 commit c8d81f1

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ impl<'ll> CodegenCx<'ll, '_> {
327327
// ThinLTO can't handle this workaround in all cases, so we don't
328328
// emit the attrs. Instead we make them unnecessary by disallowing
329329
// dynamic linking when linker plugin based LTO is enabled.
330-
!self.tcx.sess.opts.cg.linker_plugin_lto.enabled() &&
331-
self.tcx.sess.lto() != Lto::Thin;
330+
!self.tcx.sess.opts.cg.linker_plugin_lto.enabled();
332331

333332
// If this assertion triggers, there's something wrong with commandline
334333
// argument validation.

tests/codegen/issues/auxiliary/static_dllimport_aux.rs

-13
This file was deleted.

tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs

-15
This file was deleted.

0 commit comments

Comments
 (0)