| ... | ... | @@ -1200,8 +1200,8 @@ pub fn setExecCmd(self: *Compile, args: []const ?[]const u8) void { |
| 1200 | 1200 | fn linkLibraryOrObject(self: *Compile, other: *Compile) void { |
| 1201 | 1201 | other.forceEmit(.bin); |
| 1202 | 1202 | |
| 1203 | | if (other.kind == .lib and other.target.isWindows()) { // TODO(xq): Is this the correct logic here? |
| 1204 | | _ = other.getEmittedImplib(); // Force emission of the binary |
| 1203 | if (other.target.isWindows() and other.isDynamicLibrary()) { // TODO(xq): Is this the correct logic here? |
| 1204 | other.forceEmit(.implib); |
| 1205 | 1205 | } |
| 1206 | 1206 | |
| 1207 | 1207 | self.step.dependOn(&other.step); |
| ... | ... | @@ -1434,9 +1434,9 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| 1434 | 1434 | |
| 1435 | 1435 | // TODO(xq): Is that the right way? |
| 1436 | 1436 | const full_path_lib = if (other.isDynamicLibrary() and other.target.isWindows()) |
| 1437 | | other.getGeneratedFilePath("generated_implib", &self.step) |
| 1437 | other.getGeneratedFilePath("generated_implib", &self.step) // For DLLs, we gotta link against the implib, |
| 1438 | 1438 | else |
| 1439 | | other.getGeneratedFilePath("generated_bin", &self.step); |
| 1439 | other.getGeneratedFilePath("generated_bin", &self.step); // for everything else, we directly link against the library file |
| 1440 | 1440 | try zig_args.append(full_path_lib); |
| 1441 | 1441 | |
| 1442 | 1442 | if (other.linkage == Linkage.dynamic and !self.target.isWindows()) { |