Skip to content

Commit

Permalink
vendor/box2d: build in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
laytan committed Sep 13, 2024
1 parent 3166c7b commit 18a6303
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions vendor/box2d/build_box2d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tar -xzvf "v$VERSION.tar.gz"

cd "box2d-$VERSION"

DISABLE_FLAGS="-DBOX2D_SAMPLES=OFF -DBOX2D_VALIDATE=OFF -DBOX2D_UNIT_TESTS=OFF"
FLAGS="-DCMAKE_BUILD_TYPE=Release -DBOX2D_SAMPLES=OFF -DBOX2D_VALIDATE=OFF -DBOX2D_UNIT_TESTS=OFF"

case "$(uname -s)" in
Darwin)
Expand All @@ -21,20 +21,20 @@ Darwin)
"x86_64" | "amd64")
rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DBOX2D_AVX2=ON -DCMAKE_OSX_ARCHITECTURES=x86_64 -S . -B build
cmake $FLAGS -DBOX2D_AVX2=ON -DCMAKE_OSX_ARCHITECTURES=x86_64 -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_darwin_amd64_avx2.a

rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DBOX2D_AVX2=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -S . -B build
cmake $FLAGS -DBOX2D_AVX2=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_darwin_amd64_sse2.a
;;
*)
rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64 -S . -B build
cmake $FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64 -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_darwin_arm64.a
;;
Expand All @@ -45,20 +45,20 @@ Darwin)
"x86_64" | "amd64")
rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DBOX2D_AVX2=ON -S . -B build
cmake $FLAGS -DBOX2D_AVX2=ON -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_other_amd64_avx2.a

rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DBOX2D_AVX2=OFF -S . -B build
cmake $FLAGS -DBOX2D_AVX2=OFF -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_other_amd64_sse2.a
;;
*)
rm -rf build
mkdir build
cmake $DISABLE_FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64 -S . -B build
cmake $FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64 -S . -B build
cmake --build build
cp build/src/libbox2d.a ../lib/box2d_other.a
;;
Expand Down
Binary file modified vendor/box2d/lib/box2d_darwin_amd64_avx2.a
Binary file not shown.
Binary file modified vendor/box2d/lib/box2d_darwin_amd64_sse2.a
Binary file not shown.
Binary file modified vendor/box2d/lib/box2d_darwin_arm64.a
Binary file not shown.

0 comments on commit 18a6303

Please sign in to comment.