X-Git-Url: http://git.lukelau.me/?p=wasm.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=13a9c43ca20dff921d0ef883548d9399327f5338;hp=5bfb9adb0901451fe3ea5fcaa3b68f41884345ef;hb=aed1f5271c857c3afa085c593d2ca6159770395c;hpb=3ef5cb466b695cba27e45bbb273af1a9aa71bad9 diff --git a/Makefile b/Makefile index 5bfb9ad..13a9c43 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +.PHONY: all +all: test.wasm + # build llvm and clang (for wasm only) toolchain/build/llvm/bin/clang: mkdir -p toolchain/build/llvm @@ -48,7 +51,9 @@ sysroot/lib/libc++abi.a: toolchain/build/llvm/bin/clang sysroot/lib/libc++.a 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=foo,--demangle,--no-entry,--allow-undefined-file=gles2.imports \ test.cpp -o test.wasm +