Skip to content

Commit 365343a

Browse files
authored
Merge pull request #17 from oven-sh/macho-tbd-arm64e-match
link.MachO: match arm64e TBD targets when linking arm64
2 parents 81c44b3 + dbc5606 commit 365343a

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)