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
Speed up emcc -v by not running sanity checks. (#13176)
Since some build tools run `emcc -v` regularly we want to be fast. This
change avoid running sanity checks which means fewer subprocesses.
On my machine this takes `emcc -v ` from ~300 to ~200 ms.
Add a new options `--check` which will force the running of sanity
checks.
See: #13004
Copy file name to clipboardExpand all lines: site/source/docs/building_from_source/verify_emscripten_environment.rst
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,27 +13,24 @@ Testing the environment
13
13
Sanity tests
14
14
------------
15
15
16
-
The first step in verifying the environment is to run Emscripten with the version command (``-v``). The command prints out information about the toolchain and runs some basic sanity tests to check that the required tools are available.
16
+
The first step in verifying the environment is to run Emscripten with ``--check``. The option prints out information about the toolchain and runs some basic sanity tests to check that the required tools are available.
17
17
18
18
Open a terminal in the directory in which you installed Emscripten (on Windows open the :ref:`Emscripten Command Prompt <emcmdprompt>`). Then call the :ref:`Emscripten Compiler Frontend (emcc) <emccdoc>` as shown::
19
19
20
-
./emcc -v
20
+
./emcc --check
21
21
22
22
.. note:: On Windows, invoke the tool with **emcc** instead of **./emcc**.
23
23
24
24
For example, the following output reports an installation where Java is missing:
WARNING root: java does not seem to exist, required for closure compiler. -O2 and above will fail. You need to define JAVA in .emscripten
29
+
emcc (Emscripten GCC-like replacement + linker emulating GNU ld) 1.21.0
30
+
shared:INFO: (Emscripten: Running sanity checks)
31
+
shared:WARNING: java does not seem to exist, required for closure compiler. -O2 and above will fail. You need to define JAVA in .emscripten
35
32
36
-
At this point you need to :ref:`Install and activate <fixing-missing-components-emcc>` any missing components. When everything is set up properly, ``emcc -v`` should give no warnings, and if you just enter ``emcc`` (without any input files), it will give an error ::
33
+
At this point you need to :ref:`Install and activate <fixing-missing-components-emcc>` any missing components. When everything is set up properly, ``emcc ---check`` should give no warnings, and if you just enter ``emcc`` (without any input files), it will give an error ::
37
34
38
35
emcc: error: no input files
39
36
@@ -64,7 +61,7 @@ Emscripten has a comprehensive test suite which may be used to further validate
64
61
Troubleshooting
65
62
===============
66
63
67
-
First run ``./emcc -v`` and examine the output to find missing components. You can also try ``./emcc --clear-cache`` to empty the :ref:`compiler's internal cache <emcc-clear-cache>` and reset it to a known good state.
64
+
First run ``./emcc --check`` and examine the output to find missing components. You can also try ``./emcc --clear-cache`` to empty the :ref:`compiler's internal cache <emcc-clear-cache>` and reset it to a known good state.
Copy file name to clipboardExpand all lines: site/source/docs/getting_started/FAQ.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Why do I get multiple errors building basic code and the tests?
17
17
18
18
All the tests in the :ref:`Emscripten test suite <emscripten-test-suite>` are known to build and pass on our test infrastructure, so if you see failures locally it is likely that there is some problem with your environment. (Rarely, there may be temporary breakage, but never on a tagged release version.)
19
19
20
-
First call ``emcc -v``, which runs basic sanity checks and prints out useful environment information. If that doesn't help, follow the instructions in :ref:`verifying-the-emscripten-environment`.
20
+
First call ``emcc --check``, which runs basic sanity checks and prints out useful environment information. If that doesn't help, follow the instructions in :ref:`verifying-the-emscripten-environment`.
21
21
22
22
You might also want to go through the :ref:`Tutorial` again, as it is updated as Emscripten changes.
Copy file name to clipboardExpand all lines: site/source/docs/porting/Debugging.rst
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ directory (e.g. **/tmp** on UNIX).
57
57
58
58
The debug logs can be analysed to profile and review the changes that were made in each step.
59
59
60
-
.. note:: The debug mode can also be enabled by specifying the :ref:`verbose output <debugging-emcc-v>` compiler flag (``emcc -v``).
60
+
.. note:: The more limited amount of debug information can also be enabled by specifying the :ref:`verbose output <debugging-emcc-v>` compiler flag (``emcc -v``).
61
61
62
62
63
63
.. _debugging-compilation-settings:
@@ -121,10 +121,8 @@ Emscripten also supports some of Clang's sanitizers, such as :ref:`sanitizer_ubs
121
121
emcc verbose output
122
122
===================
123
123
124
-
Compiling with the :ref:`emcc -v <emcc-verbose>` option passes ``-v`` to LLVM and runs Emscripten's internal sanity checks on the toolchain.
125
-
126
-
The verbose mode also enables Emscripten's :ref:`debugging-EMCC_DEBUG` to generate intermediate files for the compiler’s various stages.
127
-
124
+
Compiling with the :ref:`emcc -v <emcc-verbose>` will cause Emscripten to output
125
+
the sub-command that it runs as well as passes ``-v`` to Clang.
Copy file name to clipboardExpand all lines: site/source/docs/tools_reference/emcc.rst
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,10 +323,15 @@ Options that are modified or new in *emcc* are listed below:
323
323
``-v``
324
324
Turns on verbose output.
325
325
326
-
This will pass ``-v`` to *Clang*, and also enable ``EMCC_DEBUG`` to generate intermediate files for the compiler's various stages. It will also run Emscripten's internal sanity checks on the toolchain, etc.
326
+
This will print the internal sub-commands run by emscripten as well as ``-v``
327
+
to *Clang*.
327
328
328
329
.. tip:: ``emcc -v`` is a useful tool for diagnosing errors. It works with or without other arguments.
329
330
331
+
``--check``
332
+
Runs Emscripten's internal sanity checks and reports any issues with the
0 commit comments