mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +00:00
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.
This commit is contained in:
parent
1954cdc106
commit
4270f234db
@ -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);
|
||||
|
||||
@ -185,7 +185,9 @@ pub const LibCInstallation = struct {
|
||||
pub fn findNative(args: FindNativeOptions) FindError!LibCInstallation {
|
||||
var self: LibCInstallation = .{};
|
||||
|
||||
if (is_windows) {
|
||||
if (is_darwin) {
|
||||
@panic("Darwin is handled separately via std.zig.system.darwin module");
|
||||
} else if (is_windows) {
|
||||
if (!build_options.have_llvm)
|
||||
return error.WindowsSdkNotFound;
|
||||
var sdk: *ZigWindowsSDK = undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user