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