You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[wasm2js] Remove all handling for external memory file
We have a lot of support code and complexity in emscripten for handling
of external memory files. However, its only ever used in wasm2js mode
which is a legacy mode. The only reason we continue to support it here
IIUC is because its slightly more space efficient than embedding the
data as base64.
For small programs like hello_world this is an over codesize win. For
larger programs there is a regression in overall size in proportion to
the amount of static data in the program.
Copy file name to clipboardExpand all lines: site/source/docs/tools_reference/emcc.rst
-18Lines changed: 0 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -487,24 +487,6 @@ Options that are modified or new in *emcc* are listed below:
487
487
[general]
488
488
Shows the list of available projects in the Emscripten Ports repos. After this operation is complete, this process will exit.
489
489
490
-
.. _emcc-memory-init-file:
491
-
492
-
``--memory-init-file 0|1``
493
-
[link]
494
-
Specifies whether to emit a separate memory initialization file.
495
-
496
-
.. note:: Note that this is only relevant when *not* emitting Wasm, as Wasm embeds the memory init data in the Wasm binary.
497
-
498
-
Possible values are:
499
-
500
-
- ``0``: Do not emit a separate memory initialization file. Instead keep the static initialization inside the generated JavaScript as text. This is the default setting if compiling with -O0 or -O1 link-time optimization flags.
501
-
- ``1``: Emit a separate memory initialization file in binary format. This is more efficient than storing it as text inside JavaScript, but does mean you have another file to publish. The binary file will also be loaded asynchronously, which means ``main()`` will not be called until the file is downloaded and applied; you cannot call any C functions until it arrives. This is the default setting when compiling with -O2 or higher.
502
-
503
-
.. note:: The :ref:`safest way <faq-when-safe-to-call-compiled-functions>` to ensure that it is safe to call C functions (the initialisation file has loaded) is to call a notifier function from ``main()``.
504
-
505
-
.. note:: If you assign a network request to ``Module.memoryInitializerRequest`` (before the script runs), then it will use that request instead of automatically starting a download for you. This is beneficial in that you can, in your HTML, fire off a request for the memory init file before the script actually arrives. For this to work, the network request should be an XMLHttpRequest with responseType set to ``'arraybuffer'``. (You can also put any other object here, all it must provide is a ``.response`` property containing an ArrayBuffer.)
506
-
507
-
508
490
``-Wwarn-absolute-paths``
509
491
[compile+link]
510
492
Enables warnings about the use of absolute paths in ``-I`` and ``-L`` command line directives. This is used to warn against unintentional use of absolute paths, which is sometimes dangerous when referring to nonportable local system headers.
0 commit comments