File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void {
811
811
const is_lib = self .base .options .output_mode == .Lib ;
812
812
const is_dyn_lib = self .base .options .link_mode == .Dynamic and is_lib ;
813
813
const is_exe_or_dyn_lib = is_dyn_lib or self .base .options .output_mode == .Exe ;
814
- const link_in_crt = self .base .options .link_libc and self . base . options . output_mode == .Exe ;
814
+ const link_in_crt = self .base .options .link_libc and is_exe_or_dyn_lib ;
815
815
const target = self .base .options .target ;
816
816
817
817
// See link/Elf.zig for comments on how this mechanism works.
@@ -1054,6 +1054,7 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void {
1054
1054
1055
1055
if (is_dyn_lib ) {
1056
1056
try argv .append (try comp .get_libc_crt_file (arena , "dllcrt2.o" ));
1057
+ try argv .append ("-ALTERNATENAME:_DllMainCRTStartup=DllMainCRTStartup" );
1057
1058
} else {
1058
1059
try argv .append (try comp .get_libc_crt_file (arena , "crt2.o" ));
1059
1060
}
You can’t perform that action at this time.
0 commit comments