aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-08-02 19:17:07 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-08-03 09:52:15 -0700
commitda91ef5c28bd11823bd84b6f54df9ca601f03e21 (patch)
treeec6e830b6062bb2ce8e88a9e9b7e8d06f79979eb /src/main.zig
parentc94bbebb9150f68ce179caa4f6beeab0622696a6 (diff)
downloadzig-da91ef5c28bd11823bd84b6f54df9ca601f03e21.tar.gz
zig-da91ef5c28bd11823bd84b6f54df9ca601f03e21.zip
zig libc: restore functionality on macOS
Regressed in 2006add8496c47804ee3b6c562f420871cb4ea0a. References to native_darwin_sdk are no longer kept in the frontend. Instead the darwin SDK is detected as part of NativePaths and as part of LibCInstallation.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 3bdcf0d2ce..3f06469a75 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -891,7 +891,6 @@ fn buildOutputType(
var minor_subsystem_version: ?u32 = null;
var wasi_exec_model: ?std.builtin.WasiExecModel = null;
var enable_link_snapshots: bool = false;
- var native_darwin_sdk: ?std.zig.system.darwin.DarwinSDK = null;
var install_name: ?[]const u8 = null;
var hash_style: link.HashStyle = .both;
var entitlements: ?[]const u8 = null;
@@ -3367,7 +3366,6 @@ fn buildOutputType(
.wasi_exec_model = wasi_exec_model,
.debug_compile_errors = debug_compile_errors,
.enable_link_snapshots = enable_link_snapshots,
- .native_darwin_sdk = native_darwin_sdk,
.install_name = install_name,
.entitlements = entitlements,
.pagezero_size = pagezero_size,
@@ -4243,10 +4241,12 @@ pub fn cmdLibC(gpa: Allocator, args: []const []const u8) !void {
if (!cross_target.isNative()) {
fatal("unable to detect libc for non-native target", .{});
}
+ const target_info = try detectNativeTargetInfo(cross_target);
var libc = LibCInstallation.findNative(.{
.allocator = gpa,
.verbose = true,
+ .target = target_info.target,
}) catch |err| {
fatal("unable to detect native libc: {s}", .{@errorName(err)});
};