Skip to content

Commit

Permalink
Apply dllimport in ThinLTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Sep 22, 2024
1 parent 1f9a018 commit 643dd8c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use rustc_middle::mir::mono::MonoItem;
use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{self, Instance};
use rustc_middle::{bug, span_bug};
use rustc_session::config::Lto;
use rustc_target::abi::{
Align, AlignFromBytesError, HasDataLayout, Primitive, Scalar, Size, WrappingRange,
};
Expand Down Expand Up @@ -328,8 +327,7 @@ impl<'ll> CodegenCx<'ll, '_> {
// ThinLTO can't handle this workaround in all cases, so we don't
// emit the attrs. Instead we make them unnecessary by disallowing
// dynamic linking when linker plugin based LTO is enabled.
&& !self.tcx.sess.opts.cg.linker_plugin_lto.enabled()
&& self.tcx.sess.lto() != Lto::Thin;
&& !self.tcx.sess.opts.cg.linker_plugin_lto.enabled();

// If this assertion triggers, there's something wrong with commandline
// argument validation.
Expand Down
13 changes: 0 additions & 13 deletions tests/codegen/issues/auxiliary/static_dllimport_aux.rs

This file was deleted.

15 changes: 0 additions & 15 deletions tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs

This file was deleted.

0 comments on commit 643dd8c

Please sign in to comment.