| ... | @@ -988,11 +988,6 @@ pub const Object = struct { | ... | @@ -988,11 +988,6 @@ pub const Object = struct { |
| 988 | try o.flushTypePool(pt); | 988 | try o.flushTypePool(pt); |
| 989 | } | 989 | } |
| 990 | | 990 | |
| 991 | fn workaroundPrivateSymbolBugs(target: *const std.Target, resolved: *const InternPool.Nav.Resolved) bool { | | |
| 992 | // https://codeberg.org/ziglang/zig/issues/31865 | | |
| 993 | return target.cpu.arch.isAARCH64() and target.ofmt == .coff and resolved.@"threadlocal"; | | |
| 994 | } | | |
| 995 | | | |
| 996 | pub fn updateNav(o: *Object, pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) !void { | 991 | pub fn updateNav(o: *Object, pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) !void { |
| 997 | const zcu = o.zcu; | 992 | const zcu = o.zcu; |
| 998 | const ip = &zcu.intern_pool; | 993 | const ip = &zcu.intern_pool; |
| ... | @@ -1065,14 +1060,14 @@ pub const Object = struct { | ... | @@ -1065,14 +1060,14 @@ pub const Object = struct { |
| 1065 | false => .default, | 1060 | false => .default, |
| 1066 | }; | 1061 | }; |
| 1067 | llvm_global.ptr(&o.builder).linkage = switch (@"extern".linkage) { | 1062 | llvm_global.ptr(&o.builder).linkage = switch (@"extern".linkage) { |
| 1068 | .internal => if (o.builder.strip and !workaroundPrivateSymbolBugs(zcu.getTarget(), &resolved)) .private else .internal, | 1063 | .internal => if (o.builder.strip) .private else .internal, |
| 1069 | .strong => .external, | 1064 | .strong => .external, |
| 1070 | .weak => .extern_weak, | 1065 | .weak => .extern_weak, |
| 1071 | .link_once => unreachable, | 1066 | .link_once => unreachable, |
| 1072 | }; | 1067 | }; |
| 1073 | llvm_global.ptr(&o.builder).visibility = .fromSymbolVisibility(@"extern".visibility); | 1068 | llvm_global.ptr(&o.builder).visibility = .fromSymbolVisibility(@"extern".visibility); |
| 1074 | } else { | 1069 | } else { |
| 1075 | llvm_global.ptr(&o.builder).linkage = if (o.builder.strip and !workaroundPrivateSymbolBugs(zcu.getTarget(), &resolved)) .private else .internal; | 1070 | llvm_global.ptr(&o.builder).linkage = if (o.builder.strip) .private else .internal; |
| 1076 | llvm_global.ptr(&o.builder).visibility = .default; | 1071 | llvm_global.ptr(&o.builder).visibility = .default; |
| 1077 | llvm_global.ptr(&o.builder).dll_storage_class = .default; | 1072 | llvm_global.ptr(&o.builder).dll_storage_class = .default; |
| 1078 | llvm_global.ptr(&o.builder).unnamed_addr = .unnamed_addr; | 1073 | llvm_global.ptr(&o.builder).unnamed_addr = .unnamed_addr; |