about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2025-05-18 05:01:38 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2025-05-18 05:01:38 +0000
commit789d1a4fc311301860a0decb0c327cbca7ca1c59 (patch)
treeb4a1a7fd48dd39f16ceb524733fc63c613c7e47c /compiler/rustc_codegen_llvm
parent4320e6f474ba042f235327c4afe0f27cd454a565 (diff)
parentac17c3486c6fdfbb0c3c18b99f3d8dfbff625d29 (diff)
downloadrust-789d1a4fc311301860a0decb0c327cbca7ca1c59.tar.gz
rust-789d1a4fc311301860a0decb0c327cbca7ca1c59.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/consts.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs
index cbac55c7153..bf81eb648f8 100644
--- a/compiler/rustc_codegen_llvm/src/consts.rs
+++ b/compiler/rustc_codegen_llvm/src/consts.rs
@@ -364,12 +364,7 @@ impl<'ll> CodegenCx<'ll, '_> {
 
         if !def_id.is_local() {
             let needs_dll_storage_attr = self.use_dll_storage_attrs
-                // If the symbol is a foreign item, then don't automatically apply DLLImport, as
-                // we'll rely on the #[link] attribute instead. BUT, if this is an internal symbol
-                // then it may be generated by the compiler in some crate, so we do need to apply
-                // DLLImport when linking with the MSVC linker.
-                && (!self.tcx.is_foreign_item(def_id)
-                    || (self.sess().target.is_like_msvc && fn_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL)))
+                && !self.tcx.is_foreign_item(def_id)
                 // Local definitions can never be imported, so we must not apply
                 // the DLLImport annotation.
                 && !dso_local