0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 03:52:17 +02:00

swift/build_ffi.sh: only set IPHONEOS_DEPLOYMENT_TARGET for iOS

Otherwise, local builds on macOS hosts try to build some CMake-based
dependencies for Catalyst.
This commit is contained in:
Jordan Rose 2023-08-17 15:25:12 -07:00
parent 81a8360606
commit 0df9163aae

View File

@ -11,7 +11,6 @@ SCRIPT_DIR=$(dirname "$0")
cd "${SCRIPT_DIR}"/..
. bin/build_helpers.sh
export IPHONEOS_DEPLOYMENT_TARGET=13
export CARGO_PROFILE_RELEASE_DEBUG=1 # enable line tables
export CARGO_PROFILE_RELEASE_LTO=fat # use fat LTO to reduce binary size
export CFLAGS="-DOPENSSL_SMALL ${CFLAGS:-}" # use small BoringSSL curve tables to reduce binary size
@ -20,6 +19,10 @@ export CFLAGS="-DOPENSSL_SMALL ${CFLAGS:-}" # use small BoringSSL curve tables t
export CFLAGS_aarch64_apple_ios_macabi="--target=arm64-apple-ios-macabi ${CFLAGS}"
export CFLAGS_x86_64_apple_ios_macabi="--target=x86_64-apple-ios-macabi ${CFLAGS}"
if [[ "${CARGO_BUILD_TARGET:-}" =~ -ios(-sim|-macabi)?$ ]]; then
export IPHONEOS_DEPLOYMENT_TARGET=13
fi
usage() {
cat >&2 <<END
Usage: $(basename "$0") [-d|-r] [-v] [--generate-ffi|--verify-ffi|--build-std]