aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-11-26 16:08:44 +0100
committerJakub Konka <kubkon@jakubkonka.com>2021-11-26 16:26:44 +0100
commit8317dbd1cb32eaeafa509e7142766f3d9a82de5f (patch)
tree780a0c6d17d3b10b22a3cce70543240a4900d13e /src/link.zig
parent02d8ca71f98800df08754ce3d2d2e39541178f64 (diff)
downloadzig-8317dbd1cb32eaeafa509e7142766f3d9a82de5f.tar.gz
zig-8317dbd1cb32eaeafa509e7142766f3d9a82de5f.zip
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.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig3
1 files changed, 3 insertions, 0 deletions
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;
}