X-Git-Url: http://git.lukelau.me/?p=wasm.git;a=blobdiff_plain;f=Makefile;h=40629adf7d9eb74d00b10ae2862ef33bcd117e5d;hp=5bfb9adb0901451fe3ea5fcaa3b68f41884345ef;hb=HEAD;hpb=3ef5cb466b695cba27e45bbb273af1a9aa71bad9 diff --git a/Makefile b/Makefile index 5bfb9ad..40629ad 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,10 @@ 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 \ + -I/usr/local/include \ + -Wl,--export=setup,--export=update,--demangle,--no-entry,--allow-undefined-file=gles2.imports \ test.cpp -o test.wasm +