Skip to content

Commit

Permalink
add ios simulator arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Aug 24, 2023
1 parent 0ea22d7 commit b011962
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
[ "${TARGET_OS}" = iOS ] && export USER_OPT="--enable-wolfssl"
./avbuild.sh ${TARGET_OS}
if [ "${TARGET_OS}" = iOS ]; then
if [[ "${TARGET_OS}" == "iOS"* ]]; then
find sdk-* -name "*.dylib" -delete
fi
- name: Make SDK
Expand Down
11 changes: 7 additions & 4 deletions avbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ use_llvm_binutils() {
local clang_dir=${USE_TOOLCHAIN%clang*}
local clang_name=${USE_TOOLCHAIN##*/}
local clang=$clang_dir${clang_name/-cl/}
local CLANG_FALLBACK=clang-${LLVM_VER:-16}
local CLANG_FALLBACK=clang-${LLVM_VER:-17}
$IS_APPLE_CLANG && CLANG_FALLBACK=/usr/local/opt/llvm/bin/clang
echo "clang: `$clang --version`"
# -print-prog-name= prints native dir format(on windows) and `which` fails
Expand Down Expand Up @@ -1043,6 +1043,7 @@ setup_ios_env() {
# clang -arch i386 -arch x86_64
## cc="xcrun -sdk iphoneos clang" or cc=`xcrun -sdk iphoneos --find clang`
local IOS_ARCH=$1
local OS=$2
local cc_has_bitcode=false # bitcode since xcode 7. deprecated in xcode14
clang -fembed-bitcode -E - </dev/null &>/dev/null && cc_has_bitcode=true
: ${BITCODE:=false}
Expand All @@ -1060,7 +1061,7 @@ setup_ios_env() {
local VER_OS=iphoneos
local BITCODE_FLAGS=
local ios5_lib_dir=
if [ "${IOS_ARCH:0:3}" == "arm" ]; then
if [[ "$IOS_ARCH" == "arm"* && "$OS" != *"simulator"* ]]; then
$enable_bitcode && BITCODE_FLAGS="-fembed-bitcode" # also works for new sdks
BITCODE_LFLAGS=$BITCODE_FLAGS
if [ "${IOS_ARCH:3:2}" == "64" ]; then
Expand All @@ -1084,6 +1085,8 @@ setup_ios_env() {
ios_min=7.0
elif [ "${IOS_ARCH}" == "x86" ]; then
IOS_ARCH=i386
else
ios_min=8.0
fi
# TOOLCHAIN_OPT+=" --disable-asm" # if bitcode
fi
Expand Down Expand Up @@ -1642,14 +1645,14 @@ build_all(){
[ -z "$archs" ] && {
echo ">>>>>no arch is set. setting default archs..."
[ "${os:0:3}" == "ios" ] && {
echo $os | grep simulator >/dev/null && archs=(x86 x86_64) || archs=(armv7 arm64)
echo $os | grep simulator >/dev/null && archs=(arm64 x86_64) || archs=(arm64)
}
[ "${os:0:7}" == "android" ] && archs=(armv7 arm64 x86 x86_64)
[ "${os:0:3}" == "rpi" -o "${os:0:9}" == "raspberry" ] && archs=(armv6zk armv7-a)
[[ "$os" == "sunxi" ]] && archs=(armv7)
[ "${os:0:5}" == "mingw" ] && archs=(x86 x86_64)
[ "${os:0:2}" == "vc" -o "${os:0:3}" == "win" ] && {
archs=(x86 x64 arm arm64)
archs=(x86 x64 arm64)
[ -d "$VC_LTL_DIR" ] && archs=(x86 x64)
}
[[ "${os:0:5}" == "winrt" || "${os:0:3}" == "uwp" || "$os" == win*store* || "$os" == win*phone* ]] && archs=(x86 x64 arm arm64)
Expand Down

0 comments on commit b011962

Please sign in to comment.