| author | |
| committer | |
| log | 90303a7b619ee104133089fc3cf74674d03bf42e |
| tree | 44caf79cdedc06c551fd7adc69e099ad5f3c07fc |
| parent | 2f8a3eb4c8f2de68f9337978ab9b628087530c34 |
3 files changed, 9 insertions(+), 9 deletions(-)
src/Compilation.zig+6-1| ... | @@ -5402,7 +5402,12 @@ fn buildMingwImportLib(comp: *Compilation, lib_name: []const u8, is_prelink: boo | ... | @@ -5402,7 +5402,12 @@ fn buildMingwImportLib(comp: *Compilation, lib_name: []const u8, is_prelink: boo |
| 5402 | }; | 5402 | }; |
| 5403 | 5403 | ||
| 5404 | if (is_prelink) | 5404 | if (is_prelink) |
| 5405 | comp.queuePrelinkTasks(&.{.{ .load_archive = crt_file_path }}) catch |err| comp.lockAndSetMiscFailure( | 5405 | comp.queuePrelinkTasks(&.{.{ |
| 5406 | .load_archive = .{ | ||
| 5407 | .path = crt_file_path, | ||
| 5408 | .must_link = false, | ||
| 5409 | }, | ||
| 5410 | }}) catch |err| comp.lockAndSetMiscFailure( | ||
| 5406 | .windows_import_lib, | 5411 | .windows_import_lib, |
| 5407 | "unable to queue prelink task for mingw import lib {f}: {t}", | 5412 | "unable to queue prelink task for mingw import lib {f}: {t}", |
| 5408 | .{ crt_file_path, err }, | 5413 | .{ crt_file_path, err }, |
src/link.zig+1-1| ... | @@ -1568,7 +1568,7 @@ pub fn doPrelinkTask(comp: *Compilation, task: PrelinkTask) void { | ... | @@ -1568,7 +1568,7 @@ pub fn doPrelinkTask(comp: *Compilation, task: PrelinkTask) void { |
| 1568 | }) catch return diags.setAllocFailure(), | 1568 | }) catch return diags.setAllocFailure(), |
| 1569 | ); | 1569 | ); |
| 1570 | if (std.mem.endsWith(u8, lib.name, "lib")) { | 1570 | if (std.mem.endsWith(u8, lib.name, "lib")) { |
| 1571 | base.openLoadArchive(path, null) catch |err| switch (err) { | 1571 | base.openLoadArchive(path, false) catch |err| switch (err) { |
| 1572 | error.LinkFailure => return, // error reported via diags | 1572 | error.LinkFailure => return, // error reported via diags |
| 1573 | else => |e| diags.addParseError(path, "failed to parse archive: {s}", .{@errorName(e)}), | 1573 | else => |e| diags.addParseError(path, "failed to parse archive: {s}", .{@errorName(e)}), |
| 1574 | }; | 1574 | }; |
src/link/Coff.zig+2-7| ... | @@ -6404,13 +6404,7 @@ fn flushSpecialSymbol(coff: *Coff, pending: SpecialSymbol) !SpecialSymbol { | ... | @@ -6404,13 +6404,7 @@ fn flushSpecialSymbol(coff: *Coff, pending: SpecialSymbol) !SpecialSymbol { |
| 6404 | .{ "wWinMainCRTStartup", "wWinMainCRTStartup" }, | 6404 | .{ "wWinMainCRTStartup", "wWinMainCRTStartup" }, |
| 6405 | } | 6405 | } |
| 6406 | else | 6406 | else |
| 6407 | &.{.{ | 6407 | &.{.{ null, if (target.abi.isGnu()) "DllMainCRTStartup" else "_DllMainCRTStartup" }}; |
| 6408 | null, | ||
| 6409 | if (comp.config.link_libc and target.abi.isGnu()) | ||
| 6410 | "DllMainCRTStartup" | ||
| 6411 | else | ||
| 6412 | "_DllMainCRTStartup", | ||
| 6413 | }}; | ||
| 6414 | 6408 | ||
| 6415 | const entry_si = for (entries) |entry| { | 6409 | const entry_si = for (entries) |entry| { |
| 6416 | if (entry[0]) |required_name| | 6410 | if (entry[0]) |required_name| |
| ... | @@ -7081,6 +7075,7 @@ fn updateExportsInner( | ... | @@ -7081,6 +7075,7 @@ fn updateExportsInner( |
| 7081 | Type.fromInterned(ip.typeOf(uav)).abiAlignment(zcu), | 7075 | Type.fromInterned(ip.typeOf(uav)).abiAlignment(zcu), |
| 7082 | ))), | 7076 | ))), |
| 7083 | }; | 7077 | }; |
| 7078 | while (try coff.idle(pt.tid)) {} | ||
| 7084 | 7079 | ||
| 7085 | const machine = coff.targetLoad(&coff.headerPtr().machine); | 7080 | const machine = coff.targetLoad(&coff.headerPtr().machine); |
| 7086 | const exported_ni = exported_si.node(coff); | 7081 | const exported_ni = exported_si.node(coff); |