compiler: MinGW-w64 import libs should not count towards any_dyn_libs.

They are, themselves, static libraries even if the resulting artifact strictly
speaking requires dynamic linking to the corresponding system DLLs to run. Note,
though, that there's no libc-provided dynamic linker on Windows like on POSIX,
so this isn't particularly problematic.

This matches x86_64-w64-mingw32-gcc behavior.
This commit is contained in:
Alex Rønne Petersen
2025-04-14 21:02:09 +02:00
parent 667035fc78
commit 715984340b

View File

@@ -4088,7 +4088,6 @@ fn createModule(
color,
) catch |err| fatal("failed to resolve link inputs: {s}", .{@errorName(err)});
if (create_module.windows_libs.count() != 0) create_module.opts.any_dyn_libs = true;
if (!create_module.opts.any_dyn_libs) for (create_module.link_inputs.items) |item| switch (item) {
.dso, .dso_exact => {
create_module.opts.any_dyn_libs = true;