| author | |
| committer | |
| log | 8f962a957a3645342fba8219cf8f33d0ac42e16d |
| tree | be4982feb1cbc0d334d5684ed49df76e602a1891 |
| parent | c3724ec506a9e3a4b23a145a733050c17321da9d |
2 files changed, 4 insertions(+), 1 deletions(-)
src/analyze.cpp+1| ... | @@ -4378,6 +4378,7 @@ void find_libc_include_path(CodeGen *g) { | ... | @@ -4378,6 +4378,7 @@ void find_libc_include_path(CodeGen *g) { |
| 4378 | 4378 | ||
| 4379 | if (g->zig_target.os == OsWindows) { | 4379 | if (g->zig_target.os == OsWindows) { |
| 4380 | ZigWindowsSDK *sdk = get_windows_sdk(g); | 4380 | ZigWindowsSDK *sdk = get_windows_sdk(g); |
| 4381 | g->libc_include_dir = buf_alloc(); | ||
| 4381 | if (os_get_win32_ucrt_include_path(sdk, g->libc_include_dir)) { | 4382 | if (os_get_win32_ucrt_include_path(sdk, g->libc_include_dir)) { |
| 4382 | zig_panic("Unable to determine libc include path."); | 4383 | zig_panic("Unable to determine libc include path."); |
| 4383 | } | 4384 | } |
src/link.cpp+3-1| ... | @@ -455,7 +455,9 @@ static void construct_linker_job_coff(LinkJob *lj) { | ... | @@ -455,7 +455,9 @@ static void construct_linker_job_coff(LinkJob *lj) { |
| 455 | lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->kernel32_lib_dir)))); | 455 | lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->kernel32_lib_dir)))); |
| 456 | 456 | ||
| 457 | lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(g->libc_lib_dir)))); | 457 | 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 | } | ||
| 459 | } | 461 | } |
| 460 | 462 | ||
| 461 | if (lj->link_in_crt) { | 463 | if (lj->link_in_crt) { |