No description
- LLVM 95%
- Rust 2.2%
- C 2.1%
- C++ 0.6%
|
William Tange
7f93fa2b93
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
|
||
|---|---|---|
| .woodpecker | Allow empty | |
| demo | Add repo url | |
| emsdk @2a9b4692ab | Document emsdk | |
| llvm-project @40af7a9e44 | Init cfg graph with bb names | |
| ullvm | Add more examples | |
| .gitignore | Try adding demo/app.{js,wasm} to root .gitignore | |
| .gitmodules | Init cfg graph with bb names | |
| README.md | -j8 doesn't seem to do anything | |
ullvm
WASM libraries are present in llvm-project/build/lib/ and llvm-sys/target/wasm32-unknown-emscripten/debug/.
Build
First, pull this repo and init submodules:
git clone --no-sparse --recursive --shallow-submodules https://codeberg.org/0d/ullvm.git
First, download and enable latest emscripten:
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..
Next, build llvm with emscripten:
mkdir llvm-project/build
cd llvm-project/build
emcmake cmake -G Ninja ../llvm
ninja LLVMAsmParser LLVMBinaryFormat LLVMBitReader LLVMBitstreamReader LLVMCore LLVMExecutionEngine LLVMIRReader LLVMRemarks LLVMSupport LLVMTarget LLVMTargetParser
cd ../..
Then, build ullvm targeting emscripten:
cd ullvm
cargo build --target=wasm32-unknown-emscripten
cd ..
You should then be able to compile demo/, linking all the necessary .a WASM archives:
cd demo
make
python3 -m http.server