From 919dcc5104d08fdb0828b3ed33e747bd2afacfbc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 17 Oct 2020 20:27:32 -0700 Subject: coff: link in CRT for DLLs that want -lc see #5748 closes #5870 --- src/link/Coff.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/link/Coff.zig b/src/link/Coff.zig index 3eb4d32c95..5dc425cb17 100644 --- a/src/link/Coff.zig +++ b/src/link/Coff.zig @@ -811,7 +811,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void { const is_lib = self.base.options.output_mode == .Lib; const is_dyn_lib = self.base.options.link_mode == .Dynamic and is_lib; const is_exe_or_dyn_lib = is_dyn_lib or self.base.options.output_mode == .Exe; - const link_in_crt = self.base.options.link_libc and self.base.options.output_mode == .Exe; + const link_in_crt = self.base.options.link_libc and is_exe_or_dyn_lib; const target = self.base.options.target; // See link/Elf.zig for comments on how this mechanism works. -- cgit v1.2.3