authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-31 11:26:02-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-31 11:26:02-04:00
log8f962a957a3645342fba8219cf8f33d0ac42e16d
treebe4982feb1cbc0d334d5684ed49df76e602a1891
parentc3724ec506a9e3a4b23a145a733050c17321da9d

fix regressions on windows


2 files changed, 4 insertions(+), 1 deletions(-)

src/analyze.cpp+1
......@@ -4378,6 +4378,7 @@ void find_libc_include_path(CodeGen *g) {
43784378
43794379 if (g->zig_target.os == OsWindows) {
43804380 ZigWindowsSDK *sdk = get_windows_sdk(g);
4381 g->libc_include_dir = buf_alloc();
43814382 if (os_get_win32_ucrt_include_path(sdk, g->libc_include_dir)) {
43824383 zig_panic("Unable to determine libc include path.");
43834384 }
src/link.cpp+3-1
......@@ -455,7 +455,9 @@ static void construct_linker_job_coff(LinkJob *lj) {
455455 lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->kernel32_lib_dir))));
456456
457457 lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->libc_lib_dir))));
458 lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->libc_static_lib_dir))));
458 if (g->libc_static_lib_dir != nullptr) {
459 lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->libc_static_lib_dir))));
460 }
459461 }
460462
461463 if (lj->link_in_crt) {