diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-05-15 16:51:32 +0800 |
|---|---|---|
| committer | Josh Stone <cuviper@gmail.com> | 2025-05-22 15:39:14 -0700 |
| commit | fcdcea758ec03be56586d1e631f8b574a4626f6c (patch) | |
| tree | 33b18779c5d47877c0757e8a9e723c2ee2773da8 /compiler/rustc_codegen_llvm | |
| parent | e39669866a746fc891f4285692e53ddb8d5c5d8d (diff) | |
| download | rust-fcdcea758ec03be56586d1e631f8b574a4626f6c.tar.gz rust-fcdcea758ec03be56586d1e631f8b574a4626f6c.zip | |
Revert "Fix linking statics on Arm64EC #140176"
Unfortunately, multiple people are reporting linker warnings related to `__rust_no_alloc_shim_is_unstable` after this change. The solution isn't quite clear yet, let's revert to green for now, and try a reland with a determined solution for `__rust_no_alloc_shim_is_unstable`. This reverts commit c8b7f32434c0306db5c1b974ee43443746098a92, reversing changes made to 667247db71ea18c4130dd018d060e7f09d589490. (cherry picked from commit 734a5b1aa7888db3d86faffea1a15254022d68c9)
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/consts.rs | 7 |
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 |
