mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 20:43:19 +00:00
fix #3237: resolve undefined symbol _DllMainCRTStartup
This commit is contained in:
parent
490cafe2c5
commit
72343ffd06
@ -1054,6 +1054,11 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void {
|
||||
|
||||
if (is_dyn_lib) {
|
||||
try argv.append(try comp.get_libc_crt_file(arena, "dllcrt2.o"));
|
||||
if (target.cpu.arch == .i386) {
|
||||
try argv.append("-ALTERNATENAME:__DllMainCRTStartup@12=_DllMainCRTStartup@12");
|
||||
} else {
|
||||
try argv.append("-ALTERNATENAME:_DllMainCRTStartup=DllMainCRTStartup");
|
||||
}
|
||||
} else {
|
||||
try argv.append(try comp.get_libc_crt_file(arena, "crt2.o"));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user