authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-06-04 06:56:08+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-06-08 17:29:14-04:00
logcde7c756767348e4c96770327b490f824f2a8e60
tree1566610eabd86210430e697d42f23d12b6f2d19a
parent0d40cb625564ca83f1b3d15202e02af656710c4a

Increase default Wasm stack to 1MB

This commit increases the default Wasm stack to 1MB from the default of 1 Wasm page which equal 64KB. This seems like a reasonable default size while at the same time not overly large. Also, Rust lang seems to be favouring this default as well: [rust-lang#50083]. [rust-lang#50083]: https://github.com/rust-lang/rust/pull/50083

1 files changed, 4 insertions(+), 0 deletions(-)

src/link.cpp+4
......@@ -2100,6 +2100,10 @@ static void construct_linker_job_wasm(LinkJob *lj) {
21002100 CodeGen *g = lj->codegen;
21012101
21022102 lj->args.append("-error-limit=0");
2103 // Increase the default stack size to a more reasonable value of 1MB instead of
2104 // the default of 1 Wasm page being 64KB.
2105 lj->args.append("-z");
2106 lj->args.append("stack-size=1048576");
21032107
21042108 if (g->out_type != OutTypeExe) {
21052109 lj->args.append("--no-entry"); // So lld doesn't look for _start.