Skip to content

Commit dd7abaa

Browse files
author
Jurvis Tan
committed
Build for aarch64-apple-darwin if using M1 mac
1 parent 36e7531 commit dd7abaa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: build-libwally.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ if [ $simulator == 1 ]; then
5353
export CFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
5454
export CXXFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
5555
mkdir -p build
56-
./configure --disable-shared --host=x86_64-apple-darwin --enable-static --disable-elements
56+
57+
architecture=$(uname -m)
58+
arch_target="x86_64-apple-darwin"
59+
60+
if [ "$architecture" = "arm64" ]; then
61+
arch_target="aarch64-apple-darwin"
62+
fi
63+
64+
./configure --disable-shared --host=$arch_target --enable-static --disable-elements
65+
5766
if [ $clean == 1 ]; then
5867
set -v # display commands
5968
make clean

0 commit comments

Comments
 (0)