Skip to content

Commit cc69be7

Browse files
committed
Add some cross referencing to settings docs. NFC
1 parent 9bc36df commit cc69be7

File tree

2 files changed

+70
-66
lines changed

2 files changed

+70
-66
lines changed

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ Default value: 0
5151
CHECK_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

6060
Default value: true
6161

@@ -97,7 +97,7 @@ If 1, then completing main() will by default call exit(), unless a refcount
9797
keeps the runtime alive. Call emscripten_exit_with_live_runtime() to finish
9898
main() while keeping the runtime alive. Calling emscripten_force_exit() will
9999
shut 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

513513
Print out all musl syscalls, including translating their numeric index
514514
to 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`
516516
to get logging for all of them.)
517517

518518
Default 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

10561056
This option only applies to Emscripten (JavaScript-based) exception handling
10571057
and does not control the native Wasm exception handling.
@@ -1068,7 +1068,7 @@ EXCEPTION_CATCHING_ALLOWED
10681068
Enables catching exception but only in the listed functions. This
10691069
option 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

10731073
This option only applies to Emscripten (JavaScript-based) exception handling
10741074
and does not control the native Wasm exception handling.
@@ -1106,7 +1106,8 @@ EXPORT_EXCEPTION_HANDLING_HELPERS
11061106
=================================
11071107

11081108
Make 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

11111112
This works with both Emscripten EH and Wasm EH. When you catch an exception
11121113
from 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
11441145
exceptions will display stack traces upon exiting. This defaults to true when
11451146
ASSERTIONS is enabled. This option is for users who want exceptions' stack
11461147
traces 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

11491150
Default value: false
11501151

@@ -1216,8 +1217,8 @@ ASYNCIFY_IMPORTS
12161217

12171218
Imports which can do an async operation, in addition to the default ones that
12181219
emscripten 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).
12211222
Note that this list used to contain the default ones, which meant that you
12221223
had to list them when adding your own; the default ones are now added
12231224
automatically.
@@ -1230,8 +1231,8 @@ ASYNCIFY_IGNORE_INDIRECT
12301231
========================
12311232

12321233
Whether 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

12361237
Default value: false
12371238

@@ -1241,9 +1242,9 @@ ASYNCIFY_STACK_SIZE
12411242
===================
12421243

12431244
The 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

12481249
Default value: 4096
12491250

@@ -1264,8 +1265,8 @@ and size.
12641265

12651266
The names in this list are names from the WebAssembly Names section. The
12661267
wasm 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
12691270
names don't end with parameters; as a result foo(int) in C++ would appear
12701271
as just foo in C (C++ has parameters because it needs to differentiate
12711272
overloaded 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
13041305
and use this list to fix up some indirect calls that *do* need to be
13051306
instrumented.
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
13081309
character substitutions.
13091310

13101311
Default value: []
@@ -1329,7 +1330,7 @@ If the Asyncify only-list is provided, then *only* the functions in the list
13291330
will be instrumented. Like the remove-list, getting this wrong will break
13301331
your 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
13331334
character substitutions.
13341335

13351336
Default value: []
@@ -3161,6 +3162,7 @@ not in others like split-dwarf).
31613162
When this flag is turned on, we error at link time if the build requires any
31623163
changes to the wasm after link. This can be useful in testing, for example.
31633164
Some example of features that require post-link wasm changes are:
3165+
31643166
- Lowering i64 to i32 pairs at the JS boundary (See WASM_BIGINT)
31653167
- Lowering sign-extension operation when targeting older browsers.
31663168

@@ -3198,7 +3200,7 @@ JS support libraries for those APIs. This allows emscripten to produce binaries
31983200
are more WASI compliant and also allows it to process and execute WASI
31993201
binaries built with other SDKs (e.g. wasi-sdk).
32003202
This setting is experimental and subject to change or removal.
3201-
Implies STANDALONE_WASM.
3203+
Implies :ref:`STANDALONE_WASM`.
32023204

32033205
.. note:: This is an experimental setting
32043206

@@ -3314,7 +3316,7 @@ LEGACY_RUNTIME
33143316

33153317
Include JS library symbols that were previously part of the default runtime.
33163318
Without this, such symbols can be made available by adding them to
3317-
DEFAULT_LIBRARY_FUNCS_TO_INCLUDE, or via the dependencies of another JS
3319+
:ref:`DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`, or via the dependencies of another JS
33183320
library symbol.
33193321

33203322
Default value: false
@@ -3325,10 +3327,10 @@ SIGNATURE_CONVERSIONS
33253327
=====================
33263328

33273329
User-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.
3330+
pointer argument. Only affects ``MEMORY64=1`` builds, see
3331+
``create_pointer_conversion_wrappers`` in ``emscripten.py`` for details.
33303332
Use _ 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
3333+
Example use ``-sSIGNATURE_CONVERSIONS=someFunction:_p,anotherFunction:p``
33323334

33333335
Default value: []
33343336

@@ -3352,7 +3354,7 @@ WASM_ESM_INTEGRATION
33523354
====================
33533355

33543356
Experimental support for wasm ESM integration.
3355-
Requires EXPORT_ES6 and MODULARIZE=instance
3357+
Requires :ref:`EXPORT_ES6` and ``MODULARIZE=instance``
33563358

33573359
.. note:: This is an experimental setting
33583360

0 commit comments

Comments
 (0)