From 0471eea0e2cac49946449efe4698d5ac18c0dc0d Mon Sep 17 00:00:00 2001 From: kcbanner Date: Tue, 8 Nov 2022 02:14:39 -0500 Subject: build: first pass on geting stage3 building under x64_64-windows-msvc --- src/Compilation.zig | 4 ++-- src/link/Coff/lld.zig | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Compilation.zig b/src/Compilation.zig index e365d1dab2..eeecf58751 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3297,8 +3297,8 @@ fn processOneJob(comp: *Compilation, job: Job) !void { // TODO Surface more error details. comp.lockAndSetMiscFailure( .windows_import_lib, - "unable to generate DLL import .lib file: {s}", - .{@errorName(err)}, + "unable to generate DLL import .lib file for {s}: {s}", + .{link_lib, @errorName(err)}, ); }; }, diff --git a/src/link/Coff/lld.zig b/src/link/Coff/lld.zig index 46b0130542..dfa56527bf 100644 --- a/src/link/Coff/lld.zig +++ b/src/link/Coff/lld.zig @@ -486,6 +486,12 @@ pub fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Nod continue; } } + if (target.abi == .msvc) { // TODO: Do this at the top, if we detect we're using the native libc? + log.warn("adding system lib {s}", .{ lib_basename }); + argv.appendAssumeCapacity(lib_basename); + continue; + } + log.err("DLL import library for -l{s} not found", .{key}); return error.DllImportLibraryNotFound; } -- cgit v1.2.3