Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default Wasm stack to 1MB #5529

Merged
merged 1 commit into from
Jun 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,10 @@ static void construct_linker_job_wasm(LinkJob *lj) {
CodeGen *g = lj->codegen;

lj->args.append("-error-limit=0");
// Increase the default stack size to a more reasonable value of 1MB instead of
// the default of 1 Wasm page being 64KB.
lj->args.append("-z");
lj->args.append("stack-size=1048576");

if (g->out_type != OutTypeExe) {
lj->args.append("--no-entry"); // So lld doesn't look for _start.
Expand Down