about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-05-18 06:35:03 +0000
committerGitHub <noreply@github.com>2025-05-18 06:35:03 +0000
commit0abf62f692d6e963a3c8cfdc402586a2be7bac51 (patch)
tree866dc9b5d510f157c9c3814de5ff426133d828be /compiler/rustc_codegen_llvm/src
parent0a28db2d5b79f71f0f1b4a05dfb2363da03e268e (diff)
parent48093fd6959835408dc15d878ad7ae0d9c469a42 (diff)
downloadrust-0abf62f692d6e963a3c8cfdc402586a2be7bac51.tar.gz
rust-0abf62f692d6e963a3c8cfdc402586a2be7bac51.zip
Merge pull request #4327 from rust-lang/rustup-2025-05-18
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-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