mention DEFAULT_LIBRARY_FUNCS_TO_INCLUDE in docs #3562

This commit is contained in:
Alon Zakai 2015-07-07 14:48:15 -07:00
Родитель 740bac5672
Коммит 42100c305c
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -117,10 +117,15 @@ parameters to pass to the function:
- Emscripten does :ref:`dead code elimination <faq-dead-code-elimination>`
to minimize code size — exporting ensures the functions you need
aren't removed.
- At higher optimisation levels (``-O2`` and above), the
:term:`closure compiler` runs and minifies (changes) function names.
- At higher optimisation levels (``-O2`` and above), code is minified,
including function names.
Exporting functions allows you to continue to access them using the
original name through the global ``Module`` object.
- If you want to export a JS library function (something from a
``src/library*.js`` file, for example), then in addition to
``EXPORTED_FUNCTIONS``, you need to add it to ``DEFAULT_LIBRARY_FUNCS_TO_INCLUDE``,
as the latter will force the method to actually be included in
the build.
- Use ``Module.ccall`` and not ``ccall`` by itself. The former will work
at all optimisation levels (even if the :term:`Closure Compiler`