authorgravatar for spexguy070@gmail.comMartin Wickham <spexguy070@gmail.com> 2021-07-10 15:55:38-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-10 17:00:42-04:00
log2d855745f91852af92ad970feef96e55919993d3
tree28604045587d4b2117a187eff8328e24ccfd6349
parenta3703745eb21923b96e807b9163d303b8e4447b7

Fix libc include directories for the MSVC target


1 files changed, 8 insertions(+), 1 deletions(-)

src/Compilation.zig+8-1
......@@ -3402,7 +3402,14 @@ fn detectLibCIncludeDirs(
34023402
34033403 // If zig can't build the libc for the target and we are targeting the
34043404 // native abi, fall back to using the system libc installation.
3405 if (is_native_abi) {
3405 // On windows, instead of the native (mingw) abi, we want to check
3406 // for the MSVC abi as a fallback.
3407 const use_system_abi = if (std.Target.current.os.tag == .windows)
3408 target.abi == .msvc
3409 else
3410 is_native_abi;
3411
3412 if (use_system_abi) {
34063413 const libc = try arena.create(LibCInstallation);
34073414 libc.* = try LibCInstallation.findNative(.{ .allocator = arena, .verbose = true });
34083415 return detectLibCFromLibCInstallation(arena, target, libc);