Skip to content

Commit b385e89

Browse files
authored
[docs] Update emsdk docs on using latest version (#21879)
1 parent 1aeffbf commit b385e89

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

site/source/docs/tools_reference/emsdk.rst

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -232,44 +232,52 @@ How do I install and activate old Emscripten SDKs and tools?
232232

233233
.. _emsdk-dev-sdk:
234234

235-
How do I track the latest Emscripten development with the SDK?
236-
--------------------------------------------------------------
235+
How do I track the latest changes with the SDK?
236+
-----------------------------------------------
237237

238-
It is also possible to use the latest and greatest versions of the tools on the GitHub repositories! This allows you to obtain new features and latest fixes immediately as they are pushed to GitHub, without having to wait for release to be tagged. **No GitHub account or fork of Emscripten is required.**
238+
To try the latest changes with emsdk you can install and activate a special
239+
version called ``tot`` (Tip-Of-Tree) which is continuously built and usually
240+
contains Emscripten and LLVM changes just a few hours after they are committed:
239241

240-
To switch to using the latest upstream git development branch (``main``), run the following:
242+
::
243+
244+
./emsdk install tot
245+
./emsdk activate tot
246+
247+
If you want to build everything yourself from the very latest sources you can
248+
use ``sdk-main-64bit``:
241249

242250
::
243251

244-
# Install git. Skip if the system already has it.
252+
# Install git (Skip if the system already has it).
245253
./emsdk install git-1.8.3
246254

247255
# Clone+pull the latest emscripten-core/emscripten/main.
248-
./emsdk install sdk-upstream-main-64bit
256+
./emsdk install sdk-main-64bit
249257

250-
# Set the "upstream-main SDK" as the active version.
251-
./emsdk activate sdk-upstream-main-64bit
258+
# Set this as the active version.
259+
./emsdk activate sdk-main-64bit
252260

253261
.. _emsdk-howto-use-own-fork:
254262

255-
How do I use my own Emscripten GitHub fork with the SDK?
256-
--------------------------------------------------------
263+
How do I use my own Emscripten fork with the SDK?
264+
-------------------------------------------------
257265

258-
It is also possible to use your own fork of the Emscripten repository via the SDK. This is useful in the case when you want to make your own modifications to the Emscripten toolchain, but still keep using the SDK environment and tools.
266+
It is also possible to use your own fork of the Emscripten repository via the
267+
SDK. This is useful in the case when you want to make your own modifications to
268+
the Emscripten toolchain, but still keep using the SDK environment and tools.
259269

260-
The way this works is that you first install the ``sdk-upstream-main`` SDK as in the :ref:`previous section <emsdk-dev-sdk>`. Then you use familiar git commands to replace this branch with the information from your own fork:
270+
To to this all you need to do is set the ``EM_CONFIG`` environment variable to
271+
point to the emsdk emscripten config and then put your own checkout of
272+
emscripten first in the ``PATH``:
261273

262274
::
263275

264-
cd emscripten/main
265-
266-
# Add a git remote link to your own repository.
267-
git remote add myremote https://github.com/mygituseraccount/emscripten.git
268-
269-
# Obtain the changes in your link.
270-
git fetch myremote
276+
cd my_emscripten/
271277

272-
# Switch the emscripten-main tool to use your fork.
273-
git checkout -b mymain --track myremote/main
278+
# Tell emscripten to use the emsdk config file
279+
export EM_CONFIG=/path/to/emsdk/.emscripten
274280

275-
You can switch back and forth between remotes via the ``git checkout`` command as usual.
281+
# Now your version of emscripten will use LLVM and binaryen
282+
# binaries from the currently active version of emsdk.
283+
./emcc

0 commit comments

Comments
 (0)