zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 90303a7b619ee104133089fc3cf74674d03bf42e (tree)
parent 2f8a3eb4c8f2de68f9337978ab9b628087530c34
Author: kcbanner <kcbanner@gmail.com>
Date:   Fri,  5 Jun 2026 01:55:35 -0400

- Fixup for new prelink task API

Diffstat:
Msrc/Compilation.zig | 7++++++-
Msrc/link.zig | 2+-
Msrc/link/Coff.zig | 9++-------
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -5402,7 +5402,12 @@ fn buildMingwImportLib(comp: *Compilation, lib_name: []const u8, is_prelink: boo }; if (is_prelink) - comp.queuePrelinkTasks(&.{.{ .load_archive = crt_file_path }}) catch |err| comp.lockAndSetMiscFailure( + comp.queuePrelinkTasks(&.{.{ + .load_archive = .{ + .path = crt_file_path, + .must_link = false, + }, + }}) catch |err| comp.lockAndSetMiscFailure( .windows_import_lib, "unable to queue prelink task for mingw import lib {f}: {t}", .{ crt_file_path, err }, diff --git a/src/link.zig b/src/link.zig @@ -1568,7 +1568,7 @@ pub fn doPrelinkTask(comp: *Compilation, task: PrelinkTask) void { }) catch return diags.setAllocFailure(), ); if (std.mem.endsWith(u8, lib.name, "lib")) { - base.openLoadArchive(path, null) catch |err| switch (err) { + base.openLoadArchive(path, false) catch |err| switch (err) { error.LinkFailure => return, // error reported via diags else => |e| diags.addParseError(path, "failed to parse archive: {s}", .{@errorName(e)}), }; diff --git a/src/link/Coff.zig b/src/link/Coff.zig @@ -6404,13 +6404,7 @@ fn flushSpecialSymbol(coff: *Coff, pending: SpecialSymbol) !SpecialSymbol { .{ "wWinMainCRTStartup", "wWinMainCRTStartup" }, } else - &.{.{ - null, - if (comp.config.link_libc and target.abi.isGnu()) - "DllMainCRTStartup" - else - "_DllMainCRTStartup", - }}; + &.{.{ null, if (target.abi.isGnu()) "DllMainCRTStartup" else "_DllMainCRTStartup" }}; const entry_si = for (entries) |entry| { if (entry[0]) |required_name| @@ -7081,6 +7075,7 @@ fn updateExportsInner( Type.fromInterned(ip.typeOf(uav)).abiAlignment(zcu), ))), }; + while (try coff.idle(pt.tid)) {} const machine = coff.targetLoad(&coff.headerPtr().machine); const exported_ni = exported_si.node(coff);