zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit fc79cbcc80c67dac5c44697ab1b3ec7b548c715c (tree)
parent 8661a13b748d25d796c0246dad7ad2584d9b0824
Author: Mitchell Kember <mk12360@gmail.com>
Date:   Fri,  5 Feb 2021 02:45:25 -0500

Use -isysroot on Catalina too, not just Big Sur

This amends #7506 to apply to macOS versions since Catalina (10.15),
rather than since Big Sur (11.0).

Diffstat:
Msrc/main.zig | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -1536,8 +1536,9 @@ fn buildOutputType( } const has_sysroot = if (comptime std.Target.current.isDarwin()) outer: { - const at_least_big_sur = target_info.target.os.getVersionRange().semver.min.major >= 11; - if (at_least_big_sur) { + const min = target_info.target.os.getVersionRange().semver.min; + const at_least_catalina = min.major >= 11 or (min.major >= 10 and min.minor >= 15); + if (at_least_catalina) { const sdk_path = try std.zig.system.getSDKPath(arena); try clang_argv.ensureCapacity(clang_argv.items.len + 2); clang_argv.appendAssumeCapacity("-isysroot");