Commit 872bc787b5

Jakub Konka <kubkon@jakubkonka.com>
2020-10-24 14:35:14
cc: fix regression on macOS after adding libc headers
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
1 parent 91a1c20
Changed files (1)
src/Compilation.zig
@@ -2127,7 +2127,9 @@ fn detectLibCIncludeDirs(
         return detectLibCFromLibCInstallation(arena, target, lci);
     }
 
-    if (target_util.canBuildLibC(target)) {
+    if (target_util.canBuildLibC(target)) outer: {
+        if (is_native_os and target.isDarwin()) break :outer; // If we're on Darwin, we want to use native since we only have headers.
+
         const generic_name = target_util.libCGenericName(target);
         // Some architectures are handled by the same set of headers.
         const arch_name = if (target.abi.isMusl()) target_util.archMuslName(target.cpu.arch) else @tagName(target.cpu.arch);