File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4378,6 +4378,7 @@ void find_libc_include_path(CodeGen *g) {
4378
4378
4379
4379
if (g->zig_target .os == OsWindows) {
4380
4380
ZigWindowsSDK *sdk = get_windows_sdk (g);
4381
+ g->libc_include_dir = buf_alloc ();
4381
4382
if (os_get_win32_ucrt_include_path (sdk, g->libc_include_dir )) {
4382
4383
zig_panic (" Unable to determine libc include path." );
4383
4384
}
Original file line number Diff line number Diff line change @@ -455,7 +455,9 @@ static void construct_linker_job_coff(LinkJob *lj) {
455
455
lj->args .append (buf_ptr (buf_sprintf (" -LIBPATH:%s" , buf_ptr (g->kernel32_lib_dir ))));
456
456
457
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
463
if (lj->link_in_crt ) {
You can’t perform that action at this time.
0 commit comments