Commit 715984340b

Alex Rønne Petersen <alex@alexrp.com>
2025-04-14 21:02:09
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.
1 parent 667035f
Changed files (1)
src/main.zig
@@ -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;