| ... | ... | @@ -2118,6 +2118,25 @@ fn buildOutputType( |
| 2118 | 2118 | continue :syslib; |
| 2119 | 2119 | } |
| 2120 | 2120 | |
| 2121 | // Unfortunately, in the case of MinGW we also need to look for `libfoo.a`. |
| 2122 | if (target_info.target.isMinGW()) { |
| 2123 | for (lib_dirs.items) |lib_dir_path| { |
| 2124 | test_path.clearRetainingCapacity(); |
| 2125 | try test_path.writer().print("{s}" ++ sep ++ "lib{s}.a", .{ |
| 2126 | lib_dir_path, lib_name, |
| 2127 | }); |
| 2128 | fs.cwd().access(test_path.items, .{}) catch |err| switch (err) { |
| 2129 | error.FileNotFound => continue, |
| 2130 | else => |e| fatal("unable to search for static library '{s}': {s}", .{ |
| 2131 | test_path.items, @errorName(e), |
| 2132 | }), |
| 2133 | }; |
| 2134 | try link_objects.append(.{ .path = try arena.dupe(u8, test_path.items) }); |
| 2135 | system_libs.orderedRemoveAt(i); |
| 2136 | continue :syslib; |
| 2137 | } |
| 2138 | } |
| 2139 | |
| 2121 | 2140 | std.log.scoped(.cli).debug("depending on system for -l{s}", .{lib_name}); |
| 2122 | 2141 | |
| 2123 | 2142 | i += 1; |