start: allow for explicitly defined entry point for Win

This commit is contained in:
Jakub Konka 2022-08-21 09:55:26 +02:00
parent 527055a821
commit 06371950cf

View File

@ -37,7 +37,9 @@ comptime {
@export(main2, .{ .name = "main" });
}
} else if (builtin.os.tag == .windows) {
if (!@hasDecl(root, "wWinMainCRTStartup")) {
@export(wWinMainCRTStartup2, .{ .name = "wWinMainCRTStartup" });
}
} else if (builtin.os.tag == .wasi and @hasDecl(root, "main")) {
@export(wasiMain2, .{ .name = "_start" });
} else {