Commit 814a41b48f
Changed files (1)
src
link
src/link/Coff.zig
@@ -1832,6 +1832,10 @@ fn linkWithLLD(coff: *Coff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node:
const linker_command = "lld-link";
try argv.appendSlice(&[_][]const u8{ comp.self_exe_path.?, linker_command });
+ if (target.isMinGW()) {
+ try argv.append("-lldmingw");
+ }
+
try argv.append("-ERRORLIMIT:0");
try argv.append("-NOLOGO");
if (comp.config.debug_format != .strip) {
@@ -2053,8 +2057,6 @@ fn linkWithLLD(coff: *Coff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node:
.win32 => {
if (link_in_crt) {
if (target.abi.isGnu()) {
- try argv.append("-lldmingw");
-
if (target.cpu.arch == .x86) {
try argv.append("-ALTERNATENAME:__image_base__=___ImageBase");
} else {