authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-08-21 18:10:31-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-09-24 20:01:19-07:00
loge05073b9e4a7a7a860779d3977a98ee6cd4b6391
treed174d0d4d1f9a811757bc4203bc78f2d063114c4
parent3764f7b0f2b2cac05f7884c93b4da3898c72cd5d

aro does not have -mmacos version flags or -Wno-overriding-option


1 files changed, 2 insertions(+), 3 deletions(-)

src/Compilation.zig+2-3
...@@ -6731,6 +6731,7 @@ fn addCommonCCArgs(...@@ -6731,6 +6731,7 @@ fn addCommonCCArgs(
6731 c_frontend: Config.CFrontend,6731 c_frontend: Config.CFrontend,
6732) !void {6732) !void {
6733 const target = &mod.resolved_target.result;6733 const target = &mod.resolved_target.result;
6734 const is_clang = c_frontend == .clang;
67346735
6735 if (target_util.supports_fpic(target)) {6736 if (target_util.supports_fpic(target)) {
6736 // PIE needs to go before PIC because Clang interprets `-fno-PIE` to imply `-fno-PIC`, which6737 // PIE needs to go before PIC because Clang interprets `-fno-PIE` to imply `-fno-PIC`, which
...@@ -6740,7 +6741,7 @@ fn addCommonCCArgs(...@@ -6740,7 +6741,7 @@ fn addCommonCCArgs(
6740 }6741 }
67416742
6742 switch (target.os.tag) {6743 switch (target.os.tag) {
6743 .ios, .macos, .tvos, .watchos => |os| {6744 .ios, .macos, .tvos, .watchos => |os| if (is_clang) {
6744 try argv.ensureUnusedCapacity(2);6745 try argv.ensureUnusedCapacity(2);
6745 // Pass the proper -m<os>-version-min argument for darwin.6746 // Pass the proper -m<os>-version-min argument for darwin.
6746 const ver = target.os.version_range.semver.min;6747 const ver = target.os.version_range.semver.min;
...@@ -6912,8 +6913,6 @@ fn addCommonCCArgs(...@@ -6912,8 +6913,6 @@ fn addCommonCCArgs(
6912 }6913 }
6913 }6914 }
69146915
6915 const is_clang = c_frontend == .clang;
6916
6917 // Only C-family files support these flags.6916 // Only C-family files support these flags.
6918 switch (ext) {6917 switch (ext) {
6919 .c,6918 .c,