Skip to content

Commit

Permalink
group iphone build FLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
lvaccaro authored and jgriffiths committed Jun 25, 2021
1 parent af1d95a commit addf809
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ if [ \( "$BUILD" = "--iphone" \) -o \( "$BUILD" = "--iphonesim" \) ]; then

export PATH=$XCODE_IOS_PATH:$PATH_BASE
export AR=ar

export CC=${XCODE_DEFAULT_PATH}/clang
export CXX=${XCODE_DEFAULT_PATH}/clang++
export CFLAGS="${SDK_CFLAGS} -isysroot ${IOS_SDK_PATH} -miphoneos-version-min=11.0 -O3 ${EXTRA_FLAGS} -fembed-bitcode"
export LDFLAGS="${SDK_LDFLAGS} -isysroot ${IOS_SDK_PATH} -miphoneos-version-min=11.0 ${EXTRA_FLAGS}"
if [ \( $BUILD = "--iphonesim" \) -a \( "$(sw_vers -productVersion)" = "10.15" \) ]; then
export DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
fi
Expand Down
5 changes: 2 additions & 3 deletions tools/buildlibwally-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ if [ "$1" = "--ndk" ]; then
${CONFIGURE_ARGS} ac_cv_c_bigendian=no --enable-swig-java --disable-swig-python --target=${SDK_PLATFORM}
elif [ \( "$1" = "--iphone" \) -o \( "$1" = "--iphonesim" \) ]; then
. ${MESON_SOURCE_ROOT}/tools/ios_env.sh $1

export CFLAGS="${SDK_CFLAGS} -isysroot ${IOS_SDK_PATH} -miphoneos-version-min=11.0 -O3 ${EXTRA_FLAGS} -fembed-bitcode"
export LDFLAGS="${SDK_LDFLAGS} -isysroot ${IOS_SDK_PATH} -miphoneos-version-min=11.0 ${EXTRA_FLAGS}"
export CFLAGS="${CFLAGS} ${EXTRA_FLAGS} -O3"
export LDFLAGS="${LDFLAGS} ${EXTRA_FLAGS}"
export CC=${XCODE_DEFAULT_PATH}/clang
export CXX=${XCODE_DEFAULT_PATH}/clang++
./configure --host=arm-apple-darwin --with-sysroot=${IOS_SDK_PATH} --build=${HOST_OS} \
Expand Down
4 changes: 2 additions & 2 deletions tools/make_txt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if [ \( "$3" = "android" \) ]; then
elif [ \( "$3" = "iphone" \) -o \( "$3" = "iphonesim" \) ]; then
C_COMPILER="clang"
CXX_COMPILER="clang++"
CFLAGS=$(comma_separate "-isysroot $IOS_SDK_PATH" "-stdlib=libc++" $SDK_CFLAGS_NO_ARCH)
LDFLAGS=$(comma_separate "-isysroot $IOS_SDK_PATH" "-stdlib=libc++" $SDK_LDFLAGS)
CFLAGS=$(comma_separate "-isysroot $IOS_SDK_PATH" "-stdlib=libc++" $SDK_CFLAGS_NO_ARCH "-miphoneos-version-min=11.0" "-fembed-bitcode")
LDFLAGS=$(comma_separate "-isysroot $IOS_SDK_PATH" "-stdlib=libc++" $SDK_LDFLAGS "-miphoneos-version-min=11.0")
ARCHS=$(comma_separate $ARCHS)
HOST_SYSTEM="darwin"
elif [ \( "$3" = "windows" \) ]; then
Expand Down

0 comments on commit addf809

Please sign in to comment.