From 8317dbd1cb32eaeafa509e7142766f3d9a82de5f Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Fri, 26 Nov 2021 16:08:44 +0100 Subject: macos: detect SDK path and version, then pass to the linker Since we are already detecting the path to the native SDK, if available, also fetch SDK's version and route that to the linker. The linker can then use it to correctly populate LC_BUILD_VERSION load command. --- src/link.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/link.zig') diff --git a/src/link.zig b/src/link.zig index 38b91c9e39..77464737b0 100644 --- a/src/link.zig +++ b/src/link.zig @@ -153,6 +153,9 @@ pub const Options = struct { /// (Zig compiler development) Enable dumping of linker's state as JSON. enable_link_snapshots: bool = false, + /// (Darwin) Path and version of the native SDK if detected. + native_darwin_sdk: ?std.zig.system.darwin.DarwinSDK = null, + pub fn effectiveOutputMode(options: Options) std.builtin.OutputMode { return if (options.use_lld) .Obj else options.output_mode; } -- cgit v1.2.3