diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-17 02:44:16 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-02-26 10:33:17 -0800 |
| commit | d51aa9748f9e4e3616328a207a8047ff37d81f8b (patch) | |
| tree | 6f517deb55ab4059c8dd10d3618ac2e2c87019b5 /src/link/Wasm.zig | |
| parent | 031f23117dadd84b1e7189ee5b0f712eeb23ca1e (diff) | |
| download | zig-d51aa9748f9e4e3616328a207a8047ff37d81f8b.tar.gz zig-d51aa9748f9e4e3616328a207a8047ff37d81f8b.zip | |
change default WASI stack size
to match the other operating systems. 16 MiB
closes #18885
Diffstat (limited to 'src/link/Wasm.zig')
| -rw-r--r-- | src/link/Wasm.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index f4bc2f8f0f..455dfa79c6 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -418,7 +418,10 @@ pub fn createEmpty( .zcu_object_sub_path = zcu_object_sub_path, .gc_sections = options.gc_sections orelse (output_mode != .Obj), .print_gc_sections = options.print_gc_sections, - .stack_size = options.stack_size orelse std.wasm.page_size * 16, // 1MB + .stack_size = options.stack_size orelse switch (target.os.tag) { + .freestanding => 1 * 1024 * 1024, // 1 MiB + else => 16 * 1024 * 1024, // 16 MiB + }, .allow_shlib_undefined = options.allow_shlib_undefined orelse false, .file = null, .disable_lld_caching = options.disable_lld_caching, |
