aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-08-04 23:28:57 +0200
committerAndrew Kelley <andrew@ziglang.org>2021-08-05 17:07:13 -0700
commit011a468381a0217bff7f98817c0df593cbcc85ec (patch)
treea27da63090ce06b3b6544d1b3e313bdf33e3b314 /src/Compilation.zig
parentbd8baefaaad97d3ec3c47163113e4b5778ef83b4 (diff)
downloadzig-011a468381a0217bff7f98817c0df593cbcc85ec.tar.gz
zig-011a468381a0217bff7f98817c0df593cbcc85ec.zip
Link system libc if natively linking frameworks on macOS
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index f8f8cea328..33112ddb1b 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -944,8 +944,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
if (options.sysroot) |sysroot| {
break :blk sysroot;
} else if (darwin_can_use_system_sdk) {
- // TODO Revisit this targeting versions lower than macOS 11 when LLVM 12 is out.
- // See https://github.com/ziglang/zig/issues/6996
const at_least_big_sur = options.target.os.getVersionRange().semver.min.major >= 11;
break :blk if (at_least_big_sur) try std.zig.system.getSDKPath(arena) else null;
} else {
@@ -1029,7 +1027,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
options.target,
options.is_native_abi,
link_libc,
- options.system_libs.len != 0,
+ options.system_libs.len != 0 or options.frameworks.len != 0,
options.libc_installation,
);