| author | |
| committer | |
| log | 4d67c3d8878b99fc7b5912dafc50c9a5c01ba169 |
| tree | fd279882a4a9eceef0bb81f1f52a2a037fd6f59a |
| parent | 4236518e3a53b510f8beb5ca67ec1baebcd07158 |
This is an alternate fix for #6773. Reverts
872bc787b56f71e53c80f4681523bc8356915b71.2 files changed, 6 insertions(+), 5 deletions(-)
src/Compilation.zig+1-3| ... | ... | @@ -2147,9 +2147,7 @@ fn detectLibCIncludeDirs( |
| 2147 | 2147 | return detectLibCFromLibCInstallation(arena, target, lci); |
| 2148 | 2148 | } |
| 2149 | 2149 | |
| 2150 | if (target_util.canBuildLibC(target)) outer: { | |
| 2151 | if (is_native_os and target.isDarwin()) break :outer; // If we're on Darwin, we want to use native since we only have headers. | |
| 2152 | ||
| 2150 | if (target_util.canBuildLibC(target)) { | |
| 2153 | 2151 | const generic_name = target_util.libCGenericName(target); |
| 2154 | 2152 | // Some architectures are handled by the same set of headers. |
| 2155 | 2153 | const arch_name = if (target.abi.isMusl()) target_util.archMuslName(target.cpu.arch) else @tagName(target.cpu.arch); |
src/target.zig+5-2| ... | ... | @@ -58,8 +58,11 @@ pub const available_libcs = [_]ArchOsAbi{ |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | 60 | pub fn libCGenericName(target: std.Target) [:0]const u8 { |
| 61 | if (target.os.tag == .windows) | |
| 62 | return "mingw"; | |
| 61 | switch (target.os.tag) { | |
| 62 | .windows => return "mingw", | |
| 63 | .macos, .ios, .tvos, .watchos => return "darwin", | |
| 64 | else => {}, | |
| 65 | } | |
| 63 | 66 | switch (target.abi) { |
| 64 | 67 | .gnu, |
| 65 | 68 | .gnuabin32, |