mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 09:03:12 +00:00
wasm: Add temporary stage2 entrypoint for wasm
This commit is contained in:
parent
aa61e03f24
commit
90d8544d40
@ -30,6 +30,8 @@ comptime {
|
||||
}
|
||||
} else if (builtin.os.tag == .windows) {
|
||||
@export(wWinMainCRTStartup2, .{ .name = "wWinMainCRTStartup" });
|
||||
} else if (builtin.os.tag == .wasi) {
|
||||
@export(wasmMain2, .{ .name = "_start" });
|
||||
} else {
|
||||
if (!@hasDecl(root, "_start")) {
|
||||
@export(_start2, .{ .name = "_start" });
|
||||
@ -98,6 +100,11 @@ fn callMain2() noreturn {
|
||||
exit2(0);
|
||||
}
|
||||
|
||||
fn wasmMain2() u8 {
|
||||
root.main();
|
||||
return 0;
|
||||
}
|
||||
|
||||
fn wWinMainCRTStartup2() callconv(.C) noreturn {
|
||||
root.main();
|
||||
exit2(0);
|
||||
|
Loading…
Reference in New Issue
Block a user