From 03236450662e66e461009e8a1159638d864b1278 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 14 Nov 2024 11:17:59 -0800 Subject: [PATCH] {ios,xcframework}build.sh: fix compilation w/Xcode 16 Don't use `-fembed-bitcode`, fixes: ld: warning: -bitcode_bundle is no longer supported and will be ignored ld: -mllvm and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together Change-Id: I4ead0fc71da39bb5ec92c1f5ba467b95ad8b7461 --- iosbuild.sh | 2 +- xcframeworkbuild.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iosbuild.sh b/iosbuild.sh index d0fb5572..859aa348 100755 --- a/iosbuild.sh +++ b/iosbuild.sh @@ -53,7 +53,7 @@ DEMUXLIBLIST='' if [[ -z "${SDK}" ]]; then echo "iOS SDK not available" exit 1 -elif [[ ${SDK%%.*} -gt 8 ]]; then +elif [[ ${SDK%%.*} -gt 8 && "${XCODE%%.*}" -lt 16 ]]; then EXTRA_CFLAGS="-fembed-bitcode" elif [[ ${SDK%%.*} -le 6 ]]; then echo "You need iOS SDK version 6.0 or above" diff --git a/xcframeworkbuild.sh b/xcframeworkbuild.sh index 14b987d4..a54b449b 100755 --- a/xcframeworkbuild.sh +++ b/xcframeworkbuild.sh @@ -172,7 +172,9 @@ for (( i = 0; i < $NUM_PLATFORMS; ++i )); do CFLAGS="-pipe -isysroot ${SDKROOT} -O3 -DNDEBUG" case "${PLATFORM}" in iPhone*) - CFLAGS+=" -fembed-bitcode" + if [[ "${XCODE%%.*}" -lt 16 ]]; then + CFLAGS+=" -fembed-bitcode" + fi CFLAGS+=" -target ${ARCH}-apple-ios${IOS_MIN_VERSION}" [[ "${PLATFORM}" == *Simulator* ]] && CFLAGS+="-simulator" ;;