zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 06371950cf0a75f7b2e602381f5250fa2419d25a (tree)
parent 527055a8215b23a13fb407bdeba2908b8206f6f0
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Sun, 21 Aug 2022 09:55:26 +0200

start: allow for explicitly defined entry point for Win

Diffstat:
Mlib/std/start.zig | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/std/start.zig b/lib/std/start.zig @@ -37,7 +37,9 @@ comptime { @export(main2, .{ .name = "main" }); } } else if (builtin.os.tag == .windows) { - @export(wWinMainCRTStartup2, .{ .name = "wWinMainCRTStartup" }); + if (!@hasDecl(root, "wWinMainCRTStartup")) { + @export(wWinMainCRTStartup2, .{ .name = "wWinMainCRTStartup" }); + } } else if (builtin.os.tag == .wasi and @hasDecl(root, "main")) { @export(wasiMain2, .{ .name = "_start" }); } else {