| ... | ... | @@ -1848,11 +1848,7 @@ fn buildOutputType( |
| 1848 | 1848 | want_native_include_dirs = true; |
| 1849 | 1849 | } |
| 1850 | 1850 | |
| 1851 | | const is_darwin_on_darwin = (comptime builtin.target.isDarwin()) and cross_target.isDarwin(); |
| 1852 | | |
| 1853 | | if (sysroot == null and (cross_target.isNativeOs() or is_darwin_on_darwin) and |
| 1854 | | (system_libs.count() != 0 or want_native_include_dirs)) |
| 1855 | | { |
| 1851 | if (sysroot == null and cross_target.isNativeOs() and (system_libs.count() != 0 or want_native_include_dirs)) { |
| 1856 | 1852 | const paths = std.zig.system.NativePaths.detect(arena, target_info) catch |err| { |
| 1857 | 1853 | fatal("unable to detect native system paths: {s}", .{@errorName(err)}); |
| 1858 | 1854 | }; |
| ... | ... | @@ -1861,12 +1857,6 @@ fn buildOutputType( |
| 1861 | 1857 | } |
| 1862 | 1858 | |
| 1863 | 1859 | const has_sysroot = if (comptime builtin.target.isDarwin()) outer: { |
| 1864 | | const should_get_sdk_path = if (cross_target.isNativeOs() and target_info.target.os.tag == .macos) inner: { |
| 1865 | | const min = target_info.target.os.getVersionRange().semver.min; |
| 1866 | | const at_least_mojave = min.major >= 11 or (min.major >= 10 and min.minor >= 14); |
| 1867 | | break :inner at_least_mojave; |
| 1868 | | } else true; |
| 1869 | | if (!should_get_sdk_path) break :outer false; |
| 1870 | 1860 | if (try std.zig.system.darwin.getSDKPath(arena, target_info.target)) |sdk_path| { |
| 1871 | 1861 | try clang_argv.ensureUnusedCapacity(2); |
| 1872 | 1862 | clang_argv.appendAssumeCapacity("-isysroot"); |