From 4270f234db02d40da1507fe5cb20029aa320ee42 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Thu, 25 Nov 2021 12:08:16 +0100 Subject: Skip detecting native libc dirs on darwin This is handled before by detecting and adding SDK path which is a centralised point for the native libc installation on darwin. --- src/Compilation.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 20d67e7c77..9da855789f 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3792,6 +3792,13 @@ fn detectLibCIncludeDirs( // If linking system libraries and targeting the native abi, default to // using the system libc installation. if (link_system_libs and is_native_abi and !target.isMinGW()) { + if (target.isDarwin()) { + // For Darwin/macOS, we are all set with getSDKPath found earlier. + return LibCDirs{ + .libc_include_dir_list = &[0][]u8{}, + .libc_installation = null, + }; + } const libc = try arena.create(LibCInstallation); libc.* = try LibCInstallation.findNative(.{ .allocator = arena, .verbose = true }); return detectLibCFromLibCInstallation(arena, target, libc); -- cgit v1.2.3