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