| ... | ... | @@ -677,6 +677,15 @@ pub const TargetMatcher = struct { |
| 677 | 677 | const host_target = try targetToAppleString(allocator, cpu_arch, .MACOS); |
| 678 | 678 | try self.target_strings.append(allocator, host_target); |
| 679 | 679 | }, |
| 680 | .MACOS => { |
| 681 | // Turns out that around 10.13/10.14 macOS release version, Apple changed the target tags in |
| 682 | // tbd files from `macosx` to `macos`. In order to be compliant and therefore actually support |
| 683 | // linking on older platforms against `libSystem.tbd`, we add `<cpu_arch>-macosx` to target_strings. |
| 684 | const fallback_target = try std.fmt.allocPrint(allocator, "{s}-macosx", .{ |
| 685 | cpuArchToAppleString(cpu_arch), |
| 686 | }); |
| 687 | try self.target_strings.append(allocator, fallback_target); |
| 688 | }, |
| 680 | 689 | else => {}, |
| 681 | 690 | } |
| 682 | 691 | |