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
{{ message }}
Repository navigation
Commit f60f9dd
Browse filesBrowse the repository at this point in the historyBrowse files
Implement Phase 1 of the native launcher design document. Provides
high-performance native C++ compiler drivers (emcc, em++) using C++20
that directly invoke Clang for compile steps (-c, -S, -E) and seamlessly
fall back to python (emcc.py / em++.py) for link steps or complex
post-processing options.
Output executables are placed in ./bin using CMake and Ninja. Adds CI
matrix testing for Linux, macOS, and Windows.
These new binaries are currently 100% optional and the python versions
can still be used without building them.
Tested using `embuilder build libc --force` on Linux CI (compiling 1,075 files sequentially with `EMCC_CORES=1`, `EMCC_USE_NINJA=0`, and `EMCC_BATCH_BUILD=0`):
| Metric | Before (Python Baseline) | After (Native Launcher) | Improvement |
| :--- | :---: | :---: | :---: |
| **Total Time** | **181.96 s** (3m 2s) | **64.82 s** (1m 5s) | **-117.14 s (64.4% faster)** |
| **Time per File** | 169.3 ms | 60.3 ms | **-109.0 ms / invocation** |
| **Speedup Factor** | 1.0x | **2.81x** | — |
**Key Takeaways:**
* **64.4% Reduction in Build Time:** Bypassing Python interpreter startup
shaves off **~109.0 ms of overhead per compiler invocation** on Linux CI
(a **2.81x speedup**).
* **Windows Impact:** Because process spawning and `python.exe` startup
carry significantly higher overhead on Windows than on Linux, the
percentage speedup on Windows CI is expected to be even larger.
See: #26453
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ There are two primary ways to install Emscripten:
39
39
The easiest way to get started is by using the Emscripten SDK. Follow the instructions on the [downloads page](https://emscripten.org/docs/getting_started/downloads.html) to install it.
40
40
41
41
2.**From a Git Checkout (Manual Installation)**
42
-
If you have cloned the repository from Git, you can install the dependencies manually and then run the bootstrap script:
42
+
If you have cloned the repository from Git, run `bootstrap.py` to build the native launcher (`emcc_native`) and set up dependencies:
43
43
```bash
44
44
./bootstrap.py
45
45
```
46
-
For more details, see the [developer guide](https://emscripten.org/docs/contributing/developers_guide.html).
46
+
Building `emcc_native` requires CMake 3.20+ and a C++20 host compiler toolchain. Alternatively, setting `EMCC_NATIVE=0`in your environment before running `./bootstrap.py` will generate legacy Python launcher scripts (e.g. `.bat` / `.ps1` files on Windows) via `./tools/maint/create_entry_points.py`. For more details, see the [developer guide](https://emscripten.org/docs/contributing/developers_guide.html).
Copy file name to clipboardExpand all lines: site/source/docs/building_from_source/toolchain_what_is_needed.rst
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,9 @@ In general a complete Emscripten environment requires the following tools. First
39
39
Compiler toolchain
40
40
------------------
41
41
42
-
When building LLVM and Binaryen from source code, whether "manually" or using the SDK, you will need a *compiler toolchain*:
42
+
When building Emscripten from source (via ``bootstrap.py`` to build
43
+
``emcc_native``), or when building LLVM and Binaryen from source, you will need
44
+
a C++20 host *compiler toolchain* and CMake 3.20+:
43
45
44
46
- Windows: You will need `Visual Studio <https://visualstudio.microsoft.com/>`_ (2019 or above) and `cmake <http://www.cmake.org/cmake/resources/software.html>`_ (3.20 or above).
0 commit comments