LLVM and Clang ported to Emscripten
-
Install prerequisites.
- Emscripten
- Clang - emllvm has been tested against Clang 3.9 and currently assumes
that Clang binaries are available under
/usr/bin
and has been tested against Clang 3.9. - CMake - Currently, version 3.4.3 or newer is required. See LLVM documentation for details.
-
Optionally, create a symlink to
emsdk-portable
(or place theemsdk-portable
directory in theemllvm
directory) so that the build script can automatically find it. -
Run the build script.
cd emllvm ./build.sh
- http://llvm.org/docs/HowToCrossCompileLLVM.html
- http://llvm.org/docs/CMake.html
- https://github.com/kripken/llvm.js - may be outdated, but it has some useful info