+.PHONY: all
+all: test.wasm
+
# build llvm and clang (for wasm only)
toolchain/build/llvm/bin/clang:
mkdir -p toolchain/build/llvm
sysroot: sysroot/lib/libc.a sysroot/lib/libc++.a sysroot/lib/libc++abi.a
test.wasm: test.cpp sysroot
- clang++ --target=wasm32-unknown-unknown-wasm -g \
+ toolchain/build/llvm/bin/clang++ \
+ --target=wasm32-unknown-unknown-wasm -g -O3 \
-fno-exceptions --sysroot=sysroot -nostartfiles \
- -Wl,--export=foo,--demangle,--no-entry \
+ -Wl,--export=setup,--demangle,--no-entry,--allow-undefined-file=gles2.imports \
test.cpp -o test.wasm
+