Skip to content

Commit dbc5606

Browse files
committed
link.MachO: match arm64e TBD targets when linking arm64
The macOS 26.4 SDK dropped arm64-* from TBD target lists and now ships arm64e-* only. Accept arm64e-<platform> as a compatible match when the cpu arch is aarch64 so symbols from libSystem.tbd and other stubs resolve.
1 parent 81c44b3 commit dbc5606

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/link/MachO/Dylib.zig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,15 @@ pub const TargetMatcher = struct {
733733
const apple_string = try targetToAppleString(allocator, cpu_arch, platform);
734734
try self.target_strings.append(allocator, apple_string);
735735

736+
// Xcode 26.4 SDK dropped `arm64-*` from TBD targets, ships `arm64e-*` only.
737+
if (cpu_arch == .aarch64) {
738+
try self.target_strings.append(allocator, try std.fmt.allocPrint(
739+
allocator,
740+
"arm64e{s}",
741+
.{apple_string["arm64".len..]},
742+
));
743+
}
744+
736745
switch (platform) {
737746
.IOSSIMULATOR, .TVOSSIMULATOR, .WATCHOSSIMULATOR, .VISIONOSSIMULATOR => {
738747
// For Apple simulator targets, linking gets tricky as we need to link against the simulator

0 commit comments

Comments
 (0)