File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3792,6 +3792,13 @@ fn detectLibCIncludeDirs(
37923792 // If linking system libraries and targeting the native abi, default to
37933793 // using the system libc installation.
37943794 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+ }
37953802 const libc = try arena .create (LibCInstallation );
37963803 libc .* = try LibCInstallation .findNative (.{ .allocator = arena , .verbose = true });
37973804 return detectLibCFromLibCInstallation (arena , target , libc );
Original file line number Diff line number Diff line change @@ -185,7 +185,9 @@ pub const LibCInstallation = struct {
185185 pub fn findNative (args : FindNativeOptions ) FindError ! LibCInstallation {
186186 var self : LibCInstallation = .{};
187187
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 ) {
189191 if (! build_options .have_llvm )
190192 return error .WindowsSdkNotFound ;
191193 var sdk : * ZigWindowsSDK = undefined ;
You can’t perform that action at this time.
0 commit comments