| ... | ... | @@ -6367,6 +6367,13 @@ fn addCommonCCArgs( |
| 6367 | 6367 | try argv.append( |
| 6368 | 6368 | try std.fmt.allocPrint(arena, "-D_WIN32_WINNT=0x{x:0>4}", .{minver}), |
| 6369 | 6369 | ); |
| 6370 | |
| 6371 | // MinGW-w64's inline functions in headers (e.g. `fabs`), which are emitted with `linkonce_odr` |
| 6372 | // linkage, sometimes cause duplicate symbol errors due to us providing the same symbols with |
| 6373 | // `weak` linkage in compiler-rt or libzigc. So just disable them. Besides, they undermine the |
| 6374 | // goal of moving more libc code to Zig, and they're also just kind of unnecessary since LLVM is |
| 6375 | // perfectly capable of recognizing and optimizing libcalls. |
| 6376 | try argv.append("-D__CRT__NO_INLINE"); |
| 6370 | 6377 | } else if (target.isFreeBSDLibC()) { |
| 6371 | 6378 | // https://docs.freebsd.org/en/books/porters-handbook/versions |
| 6372 | 6379 | const min_ver = target.os.version_range.semver.min; |