How to find the default value of e.g. -sSTACK_SIZE

12 views
Skip to first unread message

Stephan Bergmann

unread,
May 14, 2024, 9:39:52 AMMay 14
to emscripte...@googlegroups.com
One thing that puzzles me with emcc is how to find out what default
values are being used in the absence of certain -s options, like
-sSTACK_SIZE=.... I find various mentions of STACK_SIZE across the
<https://github.com/emscripten-core/emscripten/> tools/ dir, but none
that suggests that it would set a default value. (And still, a linker
invocation without an explicit -sSTACK_SIZE=... apparently passes -z
stack-size=65536, wherever it takes that value from.)

Brooke Vibber

unread,
May 14, 2024, 9:51:14 AMMay 14
to emscripte...@googlegroups.com
The most reliable documentation for emscripten CLI settings is to look at settings.js in the source:


The default here is indeed 65536 (64*1024).

-- brooke


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/106f7db3-a6ba-4cdd-b71e-e7fc0122858b%40gmail.com.

Alon Zakai

unread,
May 14, 2024, 3:39:30 PMMay 14
to emscripte...@googlegroups.com
Inspired by this discussion, I added the default values to the settings HTML page now in


For example here is STACK_SIZE:


- Alon


Stephan Bergmann

unread,
May 15, 2024, 2:15:45 AMMay 15
to emscripte...@googlegroups.com
On 5/14/24 21:39, Alon Zakai wrote:
> Inspired by this discussion, I added the default values to the settings
> HTML page now in
>
> https://github.com/emscripten-core/emscripten/pull/21943
> <https://github.com/emscripten-core/emscripten/pull/21943>
>
> For example here is STACK_SIZE:
>
> https://emscripten.org/docs/tools_reference/settings_reference.html#stack-size <https://emscripten.org/docs/tools_reference/settings_reference.html#stack-size>
>
> - Alon
>
>
> On Tue, May 14, 2024 at 6:51 AM Brooke Vibber <br...@pobox.com
> <mailto:br...@pobox.com>> wrote:
>
> The most reliable documentation for emscripten CLI settings is to
> look at settings.js in the source:
>
> https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L99 <https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L99>
>
> The default here is indeed 65536 (64*1024).
>
> -- brooke

Ah, and the Python code reads the JavaScript settings.js via some
`read_js_settings` in `tools/settings.py`. (It didn't occur to me to
hunt JavaScript files for the Python settings ;)

Thanks all!

Reply all
Reply to author
Forward
0 new messages