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 Aug 12, 2024
1 parent 41dd149 commit c8d81f1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,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 c8d81f1

Please sign in to comment.