commit 5f205874d0ea3068b4f0b8a023835ad409a96b25
parent 52016f3f71a55e7666fe0b2186a959653340f5f7
Author: amin <dev@aminmesbah.com>
Date: Mon, 3 Feb 2020 09:42:10 +0000
Fix broken wasm build
FossilOrigin-Name: 3cf90d4bf243cc6c57e47b3bc604b71ece48ac7c4423c5170ab1aaa146681fb0
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build_wasm.sh b/build_wasm.sh
@@ -14,6 +14,7 @@ cp src/platform_wasm_index.html $wasm_dir/index.html
cp -r shader/ $wasm_dir
cp -r assets/ $wasm_dir
+clang_version=$(clang -v 2>&1 | head -1 | cut -d " " -f 3)
clang \
-cc1 \
-Ofast \
@@ -22,7 +23,7 @@ clang \
-ffreestanding \
-fno-builtin \
-std=c11 \
- -internal-isystem /usr/lib/clang/9.0.0/include \
+ -internal-isystem /usr/lib/clang/$clang_version/include \
-internal-externc-isystem /usr/include \
-DGAME_WEBGL \
-o $wasm_dir/wasm.bc \