aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-10-15 19:37:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-10-15 19:37:55 -0700
commitd87bd3d8afc883853958389fcf4c65826426769b (patch)
treee081338028a98565fc44bd77c45bf90a3e1d862e /src
parentc7c38e72793df53e6582b6f8b501e18314ab07e9 (diff)
downloadzig-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')
-rw-r--r--src/link/Coff.zig12
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");
}
}
}