| ... | ... | @@ -3295,7 +3295,14 @@ fn detectLibCIncludeDirs( |
| 3295 | 3295 | |
| 3296 | 3296 | // If zig can't build the libc for the target and we are targeting the |
| 3297 | 3297 | // native abi, fall back to using the system libc installation. |
| 3298 | | if (is_native_abi) { |
| 3298 | // On windows, instead of the native (mingw) abi, we want to check |
| 3299 | // for the MSVC abi as a fallback. |
| 3300 | const use_system_abi = if (std.Target.current.os.tag == .windows) |
| 3301 | target.abi == .msvc |
| 3302 | else |
| 3303 | is_native_abi; |
| 3304 | |
| 3305 | if (use_system_abi) { |
| 3299 | 3306 | const libc = try arena.create(LibCInstallation); |
| 3300 | 3307 | libc.* = try LibCInstallation.findNative(.{ .allocator = arena, .verbose = true }); |
| 3301 | 3308 | return detectLibCFromLibCInstallation(arena, target, libc); |