LLVM and libcxx with WebAssembly support (without emscripten or binaryen).
Makefile Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitattributes
.gitignore
checkout
makefile
musl.patch
readme.md
wasm.sh
wasm.syms

readme.md

LLVM

Automatically installs LLVM with optional libcxx WebAssembly support using jfbastien/musl on Linux.

Dependencies

Install dependencies in WSL.

apt install build-essential binutils-dev ninja-build nasm git subversion libedit-dev

Usage

Download this repository.

git clone https://github.com/qis/llvm && cd llvm

Install LLVM with the following command.

make PREFIX=/opt/llvm SHARED=OFF STATIC=ON WASM=ON JOBS=4

Configure shared libraries in case llvm was installed with the SHARED=ON option.

cat > /etc/ld.so.conf.d/llvm.conf <<EOF
/opt/llvm/lib
/opt/llvm/lib/clang/7.0.0/lib/linux
EOF
ldconfig

Example

A precompiled WebAssembly binary can be seen in action here.