@@ -51,11 +51,11 @@ Default value: 0
5151CHECK_NULL_WRITES
5252=================
5353
54- When STACK_OVERFLOW_CHECK is enabled we also check writes to address zero.
55- This can help detect NULL pointer usage. If you want to skip this extra
56- check (for example, if you want reads from the address zero to always return
57- zero) you can disable this here. This setting has no effect when
58- STACK_OVERFLOW_CHECK is disabled.
54+ When :ref` STACK_OVERFLOW_CHECK` is enabled we also check writes to address
55+ zero. This can help detect NULL pointer usage. If you want to skip this
56+ extra check (for example, if you want reads from the address zero to always
57+ return zero) you can disable this here. This setting has no effect when
58+ :ref: ` STACK_OVERFLOW_CHECK ` is disabled.
5959
6060Default value: true
6161
@@ -97,7 +97,7 @@ If 1, then completing main() will by default call exit(), unless a refcount
9797keeps the runtime alive. Call emscripten_exit_with_live_runtime() to finish
9898main() while keeping the runtime alive. Calling emscripten_force_exit() will
9999shut down the runtime, invoking atexit()s, and flushing stdio streams.
100- This setting is controlled automatically in STANDALONE_WASM mode:
100+ This setting is controlled automatically in :ref: ` STANDALONE_WASM ` mode:
101101
102102- For a command (has a main function) this is always 1
103103- For a reactor (no main function) this is always 0
@@ -512,7 +512,7 @@ SYSCALL_DEBUG
512512
513513Print out all musl syscalls, including translating their numeric index
514514to the string name, which can be convenient for debugging. (Other system
515- calls are not numbered and already have clear names; use LIBRARY_DEBUG
515+ calls are not numbered and already have clear names; use :ref: ` LIBRARY_DEBUG `
516516to get logging for all of them.)
517517
518518Default value: false
@@ -1051,7 +1051,7 @@ and the program will halt (so this will not introduce silent failures).
10511051 as it may contain thrown exceptions that are never caught (e.g.
10521052 just using std::vector can have that). -fno-rtti may help as well.
10531053
1054- This option is mutually exclusive with EXCEPTION_CATCHING_ALLOWED.
1054+ This option is mutually exclusive with :ref: ` EXCEPTION_CATCHING_ALLOWED ` .
10551055
10561056This option only applies to Emscripten (JavaScript-based) exception handling
10571057and does not control the native Wasm exception handling.
@@ -1068,7 +1068,7 @@ EXCEPTION_CATCHING_ALLOWED
10681068Enables catching exception but only in the listed functions. This
10691069option acts like a more precise version of ``DISABLE_EXCEPTION_CATCHING=0 ``.
10701070
1071- This option is mutually exclusive with DISABLE_EXCEPTION_CATCHING.
1071+ This option is mutually exclusive with :ref: ` DISABLE_EXCEPTION_CATCHING ` .
10721072
10731073This option only applies to Emscripten (JavaScript-based) exception handling
10741074and does not control the native Wasm exception handling.
@@ -1106,7 +1106,8 @@ EXPORT_EXCEPTION_HANDLING_HELPERS
11061106=================================
11071107
11081108Make the exception message printing function, 'getExceptionMessage' available
1109- in the JS library for use, by adding necessary symbols to EXPORTED_FUNCTIONS.
1109+ in the JS library for use, by adding necessary symbols to
1110+ :ref: `EXPORTED_FUNCTIONS `.
11101111
11111112This works with both Emscripten EH and Wasm EH. When you catch an exception
11121113from JS, that gives you a user-thrown value in case of Emscripten EH, and a
@@ -1144,7 +1145,7 @@ When this is enabled, exceptions will contain stack traces and uncaught
11441145exceptions will display stack traces upon exiting. This defaults to true when
11451146ASSERTIONS is enabled. This option is for users who want exceptions' stack
11461147traces but do not want other overheads ASSERTIONS can incur.
1147- This option implies EXPORT_EXCEPTION_HANDLING_HELPERS.
1148+ This option implies :ref: ` EXPORT_EXCEPTION_HANDLING_HELPERS ` .
11481149
11491150Default value: false
11501151
@@ -1216,8 +1217,8 @@ ASYNCIFY_IMPORTS
12161217
12171218Imports which can do an async operation, in addition to the default ones that
12181219emscripten defines like emscripten_sleep. If you add more you will need to
1219- mention them to here, or else they will not work (in ASSERTIONS builds an
1220- error will be shown).
1220+ mention them to here, or else they will not work (in :ref: ` ASSERTIONS ` builds
1221+ an error will be shown).
12211222Note that this list used to contain the default ones, which meant that you
12221223had to list them when adding your own; the default ones are now added
12231224automatically.
@@ -1230,8 +1231,8 @@ ASYNCIFY_IGNORE_INDIRECT
12301231========================
12311232
12321233Whether indirect calls can be on the stack during an unwind/rewind.
1233- If you know they cannot, then setting this can be extremely helpful, as otherwise asyncify
1234- must assume an indirect call can reach almost everywhere.
1234+ If you know they cannot, then setting this can be extremely helpful, as
1235+ otherwise asyncify must assume an indirect call can reach almost everywhere.
12351236
12361237Default value: false
12371238
@@ -1241,9 +1242,9 @@ ASYNCIFY_STACK_SIZE
12411242===================
12421243
12431244The size of the asyncify stack - the region used to store unwind/rewind
1244- info. This must be large enough to store the call stack and locals. If it is too
1245- small, you will see a wasm trap due to executing an "unreachable" instruction.
1246- In that case, you should increase this size.
1245+ info. This must be large enough to store the call stack and locals. If it is
1246+ too small, you will see a wasm trap due to executing an "unreachable"
1247+ instruction. In that case, you should increase this size.
12471248
12481249Default value: 4096
12491250
@@ -1264,8 +1265,8 @@ and size.
12641265
12651266The names in this list are names from the WebAssembly Names section. The
12661267wasm backend will emit those names in *human-readable * form instead of
1267- typical C++ mangling. For example, you should write Struct::func()
1268- instead of _ZN6Struct4FuncEv. C is also different from C++, as C
1268+ typical C++ mangling. For example, you should write `` Struct::func() ``
1269+ instead of `` _ZN6Struct4FuncEv `` . C is also different from C++, as C
12691270names don't end with parameters; as a result foo(int) in C++ would appear
12701271as just foo in C (C++ has parameters because it needs to differentiate
12711272overloaded functions). You will see warnings in the console if a name in the
@@ -1304,7 +1305,7 @@ in the safest way possible, this is only useful if you use IGNORE_INDIRECT
13041305and use this list to fix up some indirect calls that *do * need to be
13051306instrumented.
13061307
1307- See notes on ASYNCIFY_REMOVE about the names, including wildcard matching and
1308+ See :ref: ` ASYNCIFY_REMOVE ` about the names, including wildcard matching and
13081309character substitutions.
13091310
13101311Default value: []
@@ -1329,7 +1330,7 @@ If the Asyncify only-list is provided, then *only* the functions in the list
13291330will be instrumented. Like the remove-list, getting this wrong will break
13301331your application.
13311332
1332- See notes on ASYNCIFY_REMOVE about the names, including wildcard matching and
1333+ See :ref: ` ASYNCIFY_REMOVE ` about the names, including wildcard matching and
13331334character substitutions.
13341335
13351336Default value: []
@@ -1539,8 +1540,9 @@ generated code even after running closure compiler (on "Module"). Native
15391540symbols listed here require an ``_ `` prefix.
15401541
15411542By default if this setting is not specified on the command line the
1542- ``_main `` function will be implicitly exported. In STANDALONE_WASM mode the
1543- default export is ``__start `` (or ``__initialize `` if --no-entry is specified).
1543+ ``_main `` function will be implicitly exported. In :ref: `STANDALONE_WASM `
1544+ mode the default export is ``__start `` (or ``__initialize `` if ``--no-entry ``
1545+ is specified).
15441546
15451547JS Library symbols can also be added to this list (without the leading `$ `).
15461548
@@ -2043,9 +2045,9 @@ Default value: 1
20432045STANDALONE_WASM
20442046===============
20452047
2046- STANDALONE_WASM indicates that we want to emit a wasm file that can run
2047- without JavaScript. The file will use standard APIs such as wasi as much as
2048- possible to achieve that.
2048+ Indicates that we want to emit a wasm file that can run without JavaScript.
2049+ The file will use standard APIs such as wasi as much as possible to achieve
2050+ that.
20492051
20502052This option does not guarantee that the wasm can be used by itself - if you
20512053use APIs with no non-JS alternative, we will still use those (e.g., OpenGL
@@ -3161,6 +3163,7 @@ not in others like split-dwarf).
31613163When this flag is turned on, we error at link time if the build requires any
31623164changes to the wasm after link. This can be useful in testing, for example.
31633165Some example of features that require post-link wasm changes are:
3166+
31643167- Lowering i64 to i32 pairs at the JS boundary (See WASM_BIGINT)
31653168- Lowering sign-extension operation when targeting older browsers.
31663169
@@ -3198,7 +3201,7 @@ JS support libraries for those APIs. This allows emscripten to produce binaries
31983201are more WASI compliant and also allows it to process and execute WASI
31993202binaries built with other SDKs (e.g. wasi-sdk).
32003203This setting is experimental and subject to change or removal.
3201- Implies STANDALONE_WASM.
3204+ Implies :ref: ` STANDALONE_WASM ` .
32023205
32033206.. note :: This is an experimental setting
32043207
@@ -3214,6 +3217,7 @@ module. By default the wasm module defines the memory and exports
32143217it to JavaScript.
32153218Use of the following settings will enable this settings since they
32163219depend on being able to define the memory in JavaScript:
3220+
32173221- -pthread
32183222- RELOCATABLE
32193223- ASYNCIFY_LAZY_LOAD_CODE
@@ -3294,6 +3298,7 @@ extra tracing (for example, tracing that occurs on each turn of the event
32943298loop or each user callback, which can flood the console).
32953299This setting is enabled by default if any of the following debugging settings
32963300are enabled:
3301+
32973302- PTHREADS_DEBUG
32983303- DYLINK_DEBUG
32993304- LIBRARY_DEBUG
@@ -3314,7 +3319,7 @@ LEGACY_RUNTIME
33143319
33153320Include JS library symbols that were previously part of the default runtime.
33163321Without this, such symbols can be made available by adding them to
3317- DEFAULT_LIBRARY_FUNCS_TO_INCLUDE, or via the dependencies of another JS
3322+ :ref: ` DEFAULT_LIBRARY_FUNCS_TO_INCLUDE ` , or via the dependencies of another JS
33183323library symbol.
33193324
33203325Default value: false
@@ -3325,10 +3330,10 @@ SIGNATURE_CONVERSIONS
33253330=====================
33263331
33273332User-defined functions to wrap with signature conversion, which take or return
3328- pointer argument. Only affects MEMORY64=1 builds, see create_pointer_conversion_wrappers
3329- in emscripten.py for details.
3333+ pointer argument. Only affects `` MEMORY64=1 `` builds, see
3334+ `` create_pointer_conversion_wrappers `` in `` emscripten.py `` for details.
33303335Use _ for non-pointer arguments, p for pointer/i53 arguments, and P for optional pointer/i53 values.
3331- Example use -sSIGNATURE_CONVERSIONS=someFunction:_p,anotherFunction:p
3336+ Example use `` -sSIGNATURE_CONVERSIONS=someFunction:_p,anotherFunction:p ``
33323337
33333338Default value: []
33343339
@@ -3352,7 +3357,7 @@ WASM_ESM_INTEGRATION
33523357====================
33533358
33543359Experimental support for wasm ESM integration.
3355- Requires EXPORT_ES6 and MODULARIZE=instance
3360+ Requires :ref: ` EXPORT_ES6 ` and `` MODULARIZE=instance ``
33563361
33573362.. note :: This is an experimental setting
33583363
0 commit comments