about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-17 07:00:46 +0000
committerbors <bors@rust-lang.org>2025-05-17 07:00:46 +0000
commitb0e925903a04fc3b2e0903ce6110938e871c61a1 (patch)
tree30d95198456eda853561328ed5b179b1577ecc61 /compiler/rustc_codegen_llvm/src
parenta69bc17fb8026bdc0d24bb1896ff95f0eba1da4e (diff)
parent734a5b1aa7888db3d86faffea1a15254022d68c9 (diff)
downloadrust-b0e925903a04fc3b2e0903ce6110938e871c61a1.tar.gz
rust-b0e925903a04fc3b2e0903ce6110938e871c61a1.zip
Auto merge of #141024 - jieyouxu:revert-arm64ec, r=wesleywiser
Revert "Fix linking statics on Arm64EC #140176"

This reverts PR #140176.
Unfortunately, this will reopen https://github.com/rust-lang/rust/issues/138541 (re-breaking the `arm64ec-pc-windows-msvc` target).

Unfortunately, multiple people are [reporting linker warnings related to `__rust_no_alloc_shim_is_unstable`](https://github.com/rust-lang/rust/pull/140176#issuecomment-2879715554) after this change in `x86_64-pc-windows-msvc` as well. The solution isn't quite clear yet, let's revert to avoid the linker warnings on the Tier 1 MSVC target for now[^timing], and try a reland with a determined solution for `__rust_no_alloc_shim_is_unstable`.

Judging from [people reporting that they are observing this also when bootstrapping w/ stage0 rustc](https://github.com/rust-lang/rust/pull/140176#issuecomment-2881867433), we may have to cut a new beta and then repoint stage0 against that newer beta?

cc `@dpaoliello` `@wesleywiser`

r? `@wesleywiser` (or compiler)

[^timing]: Note that it's still RustWeek this week, so most team members are N/A.
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