From ed49181682ed61e8df2f30e3e086f5d55daa3cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 4 Aug 2026 10:17:43 +0200 Subject: [PATCH] Revert "llvm: work around upstream aarch64-windows bug for private thread_local symbols" This reverts commit b3747dd707eeaf06e0bacbde259bf71ef525a961. closes https://codeberg.org/ziglang/zig/issues/31865 --- src/codegen/llvm.zig | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 3ab42a713f5fd51ebe5e9d91ae9c2dbcf9922012..d85bec1b6f3b539b891f42937a1c59927a7e9cbc 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -986,11 +986,6 @@ pub const Object = struct { try o.flushTypePool(pt); } - fn workaroundPrivateSymbolBugs(target: *const std.Target, resolved: *const InternPool.Nav.Resolved) bool { - // https://codeberg.org/ziglang/zig/issues/31865 - return target.cpu.arch.isAARCH64() and target.ofmt == .coff and resolved.@"threadlocal"; - } - pub fn updateNav(o: *Object, pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) !void { const zcu = o.zcu; const ip = &zcu.intern_pool; @@ -1063,14 +1058,14 @@ pub const Object = struct { false => .default, }; llvm_global.ptr(&o.builder).linkage = switch (@"extern".linkage) { - .internal => if (o.builder.strip and !workaroundPrivateSymbolBugs(zcu.getTarget(), &resolved)) .private else .internal, + .internal => if (o.builder.strip) .private else .internal, .strong => .external, .weak => .extern_weak, .link_once => unreachable, }; llvm_global.ptr(&o.builder).visibility = .fromSymbolVisibility(@"extern".visibility); } else { - llvm_global.ptr(&o.builder).linkage = if (o.builder.strip and !workaroundPrivateSymbolBugs(zcu.getTarget(), &resolved)) .private else .internal; + llvm_global.ptr(&o.builder).linkage = if (o.builder.strip) .private else .internal; llvm_global.ptr(&o.builder).visibility = .default; llvm_global.ptr(&o.builder).dll_storage_class = .default; llvm_global.ptr(&o.builder).unnamed_addr = .unnamed_addr; -- 2.54.0