Skip to content

Commit cd09504

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

File tree

3 files changed

+1
-31
lines changed

3 files changed

+1
-31
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use rustc_middle::mir::mono::MonoItem;
1313
use rustc_middle::ty::layout::LayoutOf;
1414
use rustc_middle::ty::{self, Instance};
1515
use rustc_middle::{bug, span_bug};
16-
use rustc_session::config::Lto;
1716
use rustc_target::abi::{
1817
Align, AlignFromBytesError, HasDataLayout, Primitive, Scalar, Size, WrappingRange,
1918
};
@@ -327,8 +326,7 @@ impl<'ll> CodegenCx<'ll, '_> {
327326
// ThinLTO can't handle this workaround in all cases, so we don't
328327
// emit the attrs. Instead we make them unnecessary by disallowing
329328
// 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;
329+
!self.tcx.sess.opts.cg.linker_plugin_lto.enabled();
332330

333331
// If this assertion triggers, there's something wrong with commandline
334332
// 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)