| ... | ... | @@ -4319,11 +4319,18 @@ pub fn addCCArgs( |
| 4319 | 4319 | } |
| 4320 | 4320 | }, |
| 4321 | 4321 | .macos => { |
| 4322 | try argv.ensureUnusedCapacity(2); |
| 4322 | 4323 | // Pass the proper -m<os>-version-min argument for darwin. |
| 4323 | 4324 | const ver = target.os.version_range.semver.min; |
| 4324 | | try argv.append(try std.fmt.allocPrint(arena, "-mmacos-version-min={d}.{d}.{d}", .{ |
| 4325 | argv.appendAssumeCapacity(try std.fmt.allocPrint(arena, "-mmacos-version-min={d}.{d}.{d}", .{ |
| 4325 | 4326 | ver.major, ver.minor, ver.patch, |
| 4326 | 4327 | })); |
| 4328 | // This avoids a warning that sometimes occurs when |
| 4329 | // providing both a -target argument that contains a |
| 4330 | // version as well as the -mmacosx-version-min argument. |
| 4331 | // Zig provides the correct value in both places, so it |
| 4332 | // doesn't matter which one gets overridden. |
| 4333 | argv.appendAssumeCapacity("-Wno-overriding-t-option"); |
| 4327 | 4334 | }, |
| 4328 | 4335 | .ios, .tvos, .watchos => switch (target.cpu.arch) { |
| 4329 | 4336 | // Pass the proper -m<os>-version-min argument for darwin. |