Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Cleanup build script, use XCFramework #61

Closed
wants to merge 14 commits into from
8 changes: 4 additions & 4 deletions build-libwally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ if [ $simulator == 1 ]; then
if [ ! -d "build" ]; then
echo "Configure and compile for the simulator..."
set -v
export CFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
export CXXFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
export CFLAGS="-O3 -arch arm64 -arch x86_64 -fembed-bitcode-marker -mios-simulator-version-min=11.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
export CXXFLAGS="-O3 -arch arm64 -arch x86_64 -fembed-bitcode-marker -mios-simulator-version-min=11.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`"
mkdir -p build

./configure --disable-shared --host=aarch64-apple-darwin --enable-static --disable-elements
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7d6ef31: why would this work on an intel mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, it probably won't. I just hard-coded it for now and can fix it later 😄

Expand All @@ -72,8 +72,8 @@ if [ $device == 1 ]; then
if [ ! -d "build" ] || [ $clean == 1 ]; then
echo "Configure and cross-compile for the device..."
set -v
export CFLAGS="-O3 -arch arm64 -arch arm64e -arch armv7 -arch armv7s -fembed-bitcode -mios-version-min=10.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`"
export CXXFLAGS="-O3 -arch arm64 -arch arm64e -arch armv7 -arch armv7s -isysroot -fembed-bitcode -mios-version-min=10.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`"
export CFLAGS="-O3 -arch arm64 -fembed-bitcode -mios-version-min=11.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`"
export CXXFLAGS="-O3 -arch arm64 -fembed-bitcode -mios-version-min=11.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a3976b0: If you bump the minimum version, don't forget to update the Podspec.

For my own app (nthKey) I'm also fine with a bump to 15.0 if there's any benefit. But I don't know if anyone else is using LibWally-Swift and needs support for older versions of iOs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I bumped to 11.0 because 10.3 was the last supported iOS for >=armv7 (iPhone 5c, iirc).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it will be nice to keep it at a generous minimum version, since developers may want to support them

mkdir -p build
./configure --disable-shared --host=aarch64-apple-darwin --enable-static --disable-elements
if [ $clean == 1 ]; then
Expand Down