diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-10-15 19:37:55 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-15 19:37:55 -0700 |
| commit | d87bd3d8afc883853958389fcf4c65826426769b (patch) | |
| tree | e081338028a98565fc44bd77c45bf90a3e1d862e /src/link/Coff.zig | |
| parent | c7c38e72793df53e6582b6f8b501e18314ab07e9 (diff) | |
| download | zig-d87bd3d8afc883853958389fcf4c65826426769b.tar.gz zig-d87bd3d8afc883853958389fcf4c65826426769b.zip | |
fixups regarding windows wide strings
* remove GetModuleHandleA from kernel32.zig. use of A functions
considered harmful.
* make it a compile error to expose WinMain instead of wWinMain. same
thing.
* start code declares wWinMainCRTStartup instead of WinMainCRTStartup
when it has the choice.
Diffstat (limited to 'src/link/Coff.zig')
| -rw-r--r-- | src/link/Coff.zig | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/link/Coff.zig b/src/link/Coff.zig index 492dbfc8eb..334492e164 100644 --- a/src/link/Coff.zig +++ b/src/link/Coff.zig @@ -1097,17 +1097,13 @@ fn linkWithLLD(self: *Coff, comp: *Compilation) !void { try argv.append("-NODEFAULTLIB"); if (!is_lib) { if (self.base.options.module) |module| { - if (module.stage1_flags.have_winmain) { - try argv.append("-ENTRY:WinMain"); - } else if (module.stage1_flags.have_wwinmain) { - try argv.append("-ENTRY:wWinMain"); - } else if (module.stage1_flags.have_wwinmain_crt_startup) { - try argv.append("-ENTRY:wWinMainCRTStartup"); - } else { + if (module.stage1_flags.have_winmain_crt_startup) { try argv.append("-ENTRY:WinMainCRTStartup"); + } else { + try argv.append("-ENTRY:wWinMainCRTStartup"); } } else { - try argv.append("-ENTRY:WinMainCRTStartup"); + try argv.append("-ENTRY:wWinMainCRTStartup"); } } } |
