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
Copy file name to clipboardExpand all lines: site/source/docs/building_from_source/configuring_emscripten_settings.rst
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ Creating the compiler configuration file
18
18
The settings file is created the first time a user runs :ref:`emcc <emccdoc>` (or any of the other Emscripten tools):
19
19
20
20
1. Navigate to the directory where you cloned the Emscripten repository.
21
-
2. Enter the command:
21
+
2. Enter the command:
22
22
23
23
::
24
-
24
+
25
25
./emcc --help
26
26
27
27
You should get a ``Welcome to Emscripten!`` message. Behind the scenes, Emscripten generates a file called ``.emscripten`` in your home folder.
28
-
29
-
28
+
29
+
30
30
Emscripten makes a "best guess" at the correct locations for tools and updates the file appropriately. Where possible it will look for "system" apps (like Python and Java).
31
31
32
32
In most cases it is necessary to edit the generated file and modify at least the
The file simply assigns paths to a number of *variables* representing the main tools used by Emscripten. For example, if the user installed python to the **C:/Python27/** directory, then the file might have the line: ::
58
58
59
59
PYTHON = 'C:\\Python38\\python.exe'
60
-
60
+
61
61
62
62
The default *emcc* configuration file often gets the paths from environment variables if defined. If no variable is defined the system will also attempt to find "system executables". For example: ::
You can find out the other variable names from the default *.emscripten* file or the :ref:`example here <compiler-configuration-file>`.
66
+
You can find out the other variable names from the default *.emscripten* file or the :ref:`example here <compiler-configuration-file>`.
67
67
68
68
Editing the compiler configuration file
69
69
=======================================
70
70
71
71
The compiler configuration file can be edited with the text editor of your choice. As stated above, most default settings are likely to be correct. If you're building manually from source, you are most likely to have to update the variable ``LLVM_ROOT``
72
72
73
-
73
+
74
74
#. Edit the variable ``LLVM_ROOT`` to point to the directory where you built the LLVM binaries, such as:
.. comment .. The settings are now correct in the configuration file, but the paths and environment variables are not set in the command prompt/terminal. **HamishW** Follow up with Jukka on this.
83
-
83
+
84
84
After setting those paths, run ``emcc`` again. It should again perform the sanity checks to test the specified paths. There are further validation tests available at :ref:`verifying-the-emscripten-environment`.
Copy file name to clipboardExpand all lines: site/source/docs/compiling/Building-Projects.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
@@ -304,7 +304,7 @@ The :ref:`Tutorial` showed how :ref:`emcc <emccdoc>` can be used to compile sing
304
304
./emcc src1.o src2.o -r -o combined.o
305
305
306
306
# Combine two object files into library file
307
-
./emar rcs libfoo.a src1.o src2.o
307
+
./emar rcs libfoo.a src1.o src2.o
308
308
309
309
310
310
In addition to the capabilities it shares with *gcc*, *emcc* supports options to optimize code, control what debug information is emitted, generate HTML and other output formats, etc. These options are documented in the :ref:`emcc tool reference <emccdoc>` (``./emcc --help`` on the command line).
0 commit comments