authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-04 10:17:43+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-07 00:30:52+02:00
log66cd872dff0ac0cb4b960d703af1db3f43354091
tree1b625de3e84dcbfcbde8a22e2a9543be6b7a7881
parentcc3b6ab1a88e1b7702c4ea5a8dbb87011834b917
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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

1 files changed, 1 insertions(+), 6 deletions(-)

src/codegen/llvm.zig+1-6
...@@ -1000,11 +1000,6 @@ pub const Object = struct {...@@ -1000,11 +1000,6 @@ pub const Object = struct {
1000 try o.flushTypePool(pt);1000 try o.flushTypePool(pt);
1001 }1001 }
10021002
1003 fn workaroundPrivateSymbolBugs(target: *const std.Target, resolved: *const InternPool.Nav.Resolved) bool {
1004 // https://codeberg.org/ziglang/zig/issues/31865
1005 return target.cpu.arch.isAARCH64() and target.ofmt == .coff and resolved.@"threadlocal";
1006 }
1007
1008 pub fn updateNav(o: *Object, pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) !void {1003 pub fn updateNav(o: *Object, pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) !void {
1009 const zcu = o.zcu;1004 const zcu = o.zcu;
1010 const ip = &zcu.intern_pool;1005 const ip = &zcu.intern_pool;
...@@ -1082,7 +1077,7 @@ pub const Object = struct {...@@ -1082,7 +1077,7 @@ pub const Object = struct {
1082 };1077 };
1083 llvm_global.ptr(&o.builder).visibility = .fromSymbolVisibility(@"extern".visibility);1078 llvm_global.ptr(&o.builder).visibility = .fromSymbolVisibility(@"extern".visibility);
1084 } else {1079 } else {
1085 llvm_global.ptr(&o.builder).linkage = if (o.builder.strip and !workaroundPrivateSymbolBugs(zcu.getTarget(), &resolved)) .private else .internal;1080 llvm_global.ptr(&o.builder).linkage = if (o.builder.strip) .private else .internal;
1086 llvm_global.ptr(&o.builder).visibility = .default;1081 llvm_global.ptr(&o.builder).visibility = .default;
1087 llvm_global.ptr(&o.builder).dll_storage_class = .default;1082 llvm_global.ptr(&o.builder).dll_storage_class = .default;
1088 llvm_global.ptr(&o.builder).unnamed_addr = .unnamed_addr;1083 llvm_global.ptr(&o.builder).unnamed_addr = .unnamed_addr;