{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
This commit is contained in:
James Zern 2024-11-14 11:17:59 -08:00
parent 2ddaaf0aa5
commit 0323645066
2 changed files with 4 additions and 2 deletions

View File

@ -53,7 +53,7 @@ DEMUXLIBLIST=''
if [[ -z "${SDK}" ]]; then if [[ -z "${SDK}" ]]; then
echo "iOS SDK not available" echo "iOS SDK not available"
exit 1 exit 1
elif [[ ${SDK%%.*} -gt 8 ]]; then elif [[ ${SDK%%.*} -gt 8 && "${XCODE%%.*}" -lt 16 ]]; then
EXTRA_CFLAGS="-fembed-bitcode" EXTRA_CFLAGS="-fembed-bitcode"
elif [[ ${SDK%%.*} -le 6 ]]; then elif [[ ${SDK%%.*} -le 6 ]]; then
echo "You need iOS SDK version 6.0 or above" echo "You need iOS SDK version 6.0 or above"

View File

@ -172,7 +172,9 @@ for (( i = 0; i < $NUM_PLATFORMS; ++i )); do
CFLAGS="-pipe -isysroot ${SDKROOT} -O3 -DNDEBUG" CFLAGS="-pipe -isysroot ${SDKROOT} -O3 -DNDEBUG"
case "${PLATFORM}" in case "${PLATFORM}" in
iPhone*) iPhone*)
CFLAGS+=" -fembed-bitcode" if [[ "${XCODE%%.*}" -lt 16 ]]; then
CFLAGS+=" -fembed-bitcode"
fi
CFLAGS+=" -target ${ARCH}-apple-ios${IOS_MIN_VERSION}" CFLAGS+=" -target ${ARCH}-apple-ios${IOS_MIN_VERSION}"
[[ "${PLATFORM}" == *Simulator* ]] && CFLAGS+="-simulator" [[ "${PLATFORM}" == *Simulator* ]] && CFLAGS+="-simulator"
;; ;;