Installing a source code version

26 views
Skip to first unread message

Roderick Kennedy

unread,
Aug 2, 2021, 12:35:57 PM8/2/21
to emscripten-discuss
I'd like to use a version of Emscripten that is not a release, it comes instead from a fork of the source code (the emscripten repo rather than emsdk): g...@github.com:hujiajie/emscripten.git

What I have not been able to figure out is how to enable this version - while https://emscripten.org/docs/building_from_source/index.html contains instructions on building LLVM and Binaryen, it does not explain how to perform the equivalent setup that would be done by 

./emsdk install latest
./emsdk activate latest

How can I activate a local source build of Emscripten?

Jukka Jylänki

unread,
Oct 25, 2021, 2:16:22 PM10/25/21
to emscripte...@googlegroups.com
You can do

emsdk install sdk-upstream-main-64bit
emsdk activate sdk-upstream-main-64bit
source ./emsdk_env.sh
ch emscripten/main
git remote add hujiajie g...@github.com:hujiajie/emscripten.git
git fetch hujiajie
git checkout -b my_branch hujiajie/branch_on_remote

This way you'll have the latest source installation of a custom fork
built from source.

When/if you want to update the whole toolchain (e.g. rebuild
LLVM/Binaryen/etc to latest git again), make sure your emscripten/main
working tree is clean (does not matter what is the active checkout
there), and reissue "emsdk install sdk-upstream-main-64bit" again.
That will change the git checkout of the emscripten/main repo back to
upstream main, but you can then go back and checkout your custom
branch where you are working on.
> --
> You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/eaadeab5-173e-4209-b041-7938fad986bdn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages