mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
fix system library lookup when cross-compiling to windows-msvc
This commit is contained in:
parent
e07d8fccd1
commit
7b45bd3c09
1 changed files with 4 additions and 5 deletions
|
|
@ -4058,7 +4058,7 @@ fn createModule(
|
|||
};
|
||||
}
|
||||
|
||||
if (builtin.target.os.tag == .windows and (target.abi == .msvc or target.abi == .itanium) and
|
||||
if (target.os.tag == .windows and (target.abi == .msvc or target.abi == .itanium) and
|
||||
any_name_queries_remaining)
|
||||
{
|
||||
if (create_module.libc_installation == null) {
|
||||
|
|
@ -4069,11 +4069,10 @@ fn createModule(
|
|||
}) catch |err| {
|
||||
fatal("unable to find native libc installation: {s}", .{@errorName(err)});
|
||||
};
|
||||
|
||||
try create_module.lib_directories.ensureUnusedCapacity(arena, 2);
|
||||
addLibDirectoryWarn(&create_module.lib_directories, create_module.libc_installation.?.msvc_lib_dir.?);
|
||||
addLibDirectoryWarn(&create_module.lib_directories, create_module.libc_installation.?.kernel32_lib_dir.?);
|
||||
}
|
||||
try create_module.lib_directories.ensureUnusedCapacity(arena, 2);
|
||||
addLibDirectoryWarn(&create_module.lib_directories, create_module.libc_installation.?.msvc_lib_dir.?);
|
||||
addLibDirectoryWarn(&create_module.lib_directories, create_module.libc_installation.?.kernel32_lib_dir.?);
|
||||
}
|
||||
|
||||
// Destructively mutates but does not transfer ownership of `unresolved_link_inputs`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue