| author | |
| committer | |
| log | 4270f234db02d40da1507fe5cb20029aa320ee42 |
| tree | 9cd18be46b77fdfb97a53500130c6e19815a4d07 |
| parent | 1954cdc1066f2d59961e4cdd24a9d80fd6eb86c3 |
This is handled before by detecting and adding SDK path which
is a centralised point for the native libc installation on darwin.2 files changed, 10 insertions(+), 1 deletions(-)
src/Compilation.zig+7| ... | ... | @@ -3792,6 +3792,13 @@ fn detectLibCIncludeDirs( |
| 3792 | 3792 | // If linking system libraries and targeting the native abi, default to |
| 3793 | 3793 | // using the system libc installation. |
| 3794 | 3794 | if (link_system_libs and is_native_abi and !target.isMinGW()) { |
| 3795 | if (target.isDarwin()) { | |
| 3796 | // For Darwin/macOS, we are all set with getSDKPath found earlier. | |
| 3797 | return LibCDirs{ | |
| 3798 | .libc_include_dir_list = &[0][]u8{}, | |
| 3799 | .libc_installation = null, | |
| 3800 | }; | |
| 3801 | } | |
| 3795 | 3802 | const libc = try arena.create(LibCInstallation); |
| 3796 | 3803 | libc.* = try LibCInstallation.findNative(.{ .allocator = arena, .verbose = true }); |
| 3797 | 3804 | return detectLibCFromLibCInstallation(arena, target, libc); |
src/libc_installation.zig+3-1| ... | ... | @@ -185,7 +185,9 @@ pub const LibCInstallation = struct { |
| 185 | 185 | pub fn findNative(args: FindNativeOptions) FindError!LibCInstallation { |
| 186 | 186 | var self: LibCInstallation = .{}; |
| 187 | 187 | |
| 188 | if (is_windows) { | |
| 188 | if (is_darwin) { | |
| 189 | @panic("Darwin is handled separately via std.zig.system.darwin module"); | |
| 190 | } else if (is_windows) { | |
| 189 | 191 | if (!build_options.have_llvm) |
| 190 | 192 | return error.WindowsSdkNotFound; |
| 191 | 193 | var sdk: *ZigWindowsSDK = undefined; |