mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
vendor/box2d: clarify wasm building
This commit is contained in:
Vendored
+1
-1
@@ -24,7 +24,7 @@ when ODIN_OS == .Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
when !#exists(LIB_PATH) {
|
when !#exists(LIB_PATH) {
|
||||||
#panic("Could not find the compiled box2d libraries at \"" + LIB_PATH + "\", they can be compiled by running the `build.sh` script at `" + ODIN_ROOT + "vendor/box2d/build_box2d.sh\"`")
|
#panic("Could not find the compiled box2d libraries at \"" + LIB_PATH + "\", they can be compiled by running the `build_box2d.sh` script at `" + ODIN_ROOT + "vendor/box2d/build_box2d.sh\"`")
|
||||||
}
|
}
|
||||||
|
|
||||||
foreign import lib {
|
foreign import lib {
|
||||||
|
|||||||
Vendored
+5
@@ -68,7 +68,12 @@ esac
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
set +e
|
||||||
make -f wasm.Makefile
|
make -f wasm.Makefile
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
printf "\e[30;43mwarning:\e[0m Native Box2D libraries were built successfully, the WASM build failed, likely because your default C compiler and/or linker doesn't support WASM, you can set the CC and LD environment variables to point to a compiler and linker that support it\n"
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
rm -rf v3.0.0.tar.gz
|
rm -rf v3.0.0.tar.gz
|
||||||
rm -rf box2d-3.0.0
|
rm -rf box2d-3.0.0
|
||||||
|
|||||||
Vendored
+2
@@ -2,6 +2,8 @@
|
|||||||
# I tried to make a cmake toolchain file for this / use cmake but this is far easier.
|
# I tried to make a cmake toolchain file for this / use cmake but this is far easier.
|
||||||
# NOTE: We are pretending to be emscripten to box2d so it takes WASM code paths, but we don't actually use emscripten.
|
# NOTE: We are pretending to be emscripten to box2d so it takes WASM code paths, but we don't actually use emscripten.
|
||||||
|
|
||||||
|
# WARN: wasm is probably not supported by your default C compiler and linker, overwrite the CC and LD environment variables accordingly.
|
||||||
|
# Example for MacOS:
|
||||||
# CC = $(shell brew --prefix llvm)/bin/clang
|
# CC = $(shell brew --prefix llvm)/bin/clang
|
||||||
# LD = $(shell brew --prefix llvm)/bin/wasm-ld
|
# LD = $(shell brew --prefix llvm)/bin/wasm-ld
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user