Skip to content

Conversation

@kubkon
Copy link
Member

@kubkon kubkon commented Jun 5, 2020

Depends on #5529 so don't merge until that one lands.

This commit adds a --stack [size] link-time option to zig compiler allowing the user to override the default stack size set for the specified executable/library format. This is currently limited to ELF, COFF and Wasm however (i.e., Mach-O is excluded).

As far as Mach-O is concerned, I couldn't find any info on tweaking the stack size in ld64.lld's manual. If anyone's got any ideas, please do shout out!

Constitutes a temporary fix of #3735 until @stackSize() (or similar) lands. See #1639 for more info.

cc @pixelherodev @fengb @andrewrk

kubkon added 2 commits June 4, 2020 06:56
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]: rust-lang/rust#50083
This commit adds a `--stack [size]` link-time option to zig compiler
allowing the user to override the default stack size set for the
specified executable/library format. This is currently limited to
ELF, COFF and Wasm however (i.e., Mach-O is excluded).
@andrewrk
Copy link
Member

andrewrk commented Jun 8, 2020

Thanks, landed in 0ff5d7b.

Repeating my comment from #5529 (comment):

Eventually the plan is to have zig compute the required stack size when compiling, making the default and this overriding flag unnecessary. But until then, manual configuration is necessary.

@andrewrk andrewrk closed this Jun 8, 2020
@kubkon kubkon deleted the option-override-stack-size branch December 9, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants