Commit 89beb42b authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Carola Nitz

buildsystem: use simulator flags in simulator build

It fixes the build of TVOS with XCode 10, and avoid symbol errors.

Fix #216, #209

(cherry picked from commit a86435fe44c4418ab0c9f6c3184c36a68ab62688)
parent b9d7ba67
...@@ -20,8 +20,8 @@ TVOS=no ...@@ -20,8 +20,8 @@ TVOS=no
MACOS=no MACOS=no
IOS=yes IOS=yes
BITCODE=no BITCODE=no
OSVERSIONMINCFLAG=miphoneos-version-min OSVERSIONMINCFLAG=iphoneos
OSVERSIONMINLDFLAG=ios_version_min OSVERSIONMINLDFLAG=ios
ROOT_DIR=empty ROOT_DIR=empty
FARCH="all" FARCH="all"
...@@ -206,6 +206,8 @@ buildLibVLC() { ...@@ -206,6 +206,8 @@ buildLibVLC() {
export CXXFLAGS="" export CXXFLAGS=""
export OBJCFLAGS="" export OBJCFLAGS=""
export LDFLAGS="" export LDFLAGS=""
export EXTRA_LDFLAGS=""
export EXTRA_CFLAGS=""
export PLATFORM=$PLATFORM export PLATFORM=$PLATFORM
export SDK_VERSION=$SDK_VERSION export SDK_VERSION=$SDK_VERSION
...@@ -217,10 +219,17 @@ buildLibVLC() { ...@@ -217,10 +219,17 @@ buildLibVLC() {
LDFLAGS="-arch ${ACTUAL_ARCH}" LDFLAGS="-arch ${ACTUAL_ARCH}"
EXTRA_LDFLAGS="-arch ${ACTUAL_ARCH}" EXTRA_LDFLAGS="-arch ${ACTUAL_ARCH}"
CFLAGS+=" -${OSVERSIONMINCFLAG}=${SDK_MIN}" SDKNAME_CFLAGS=${OSVERSIONMINCFLAG}
EXTRA_CFLAGS+=" -${OSVERSIONMINCFLAG}=${SDK_MIN}" SDKNAME_LDFLAGS=${OSVERSIONMINLDFLAG}
LDFLAGS+=" -Wl,-${OSVERSIONMINLDFLAG},${SDK_MIN}"
EXTRA_LDFLAGS+=" -Wl,-${OSVERSIONMINLDFLAG},${SDK_MIN}" if [ "$PLATFORM" = "Simulator" ]; then
SDKNAME_LDFLAGS+="_simulator"
fi
CFLAGS+=" -m${SDKNAME_CFLAGS}-version-min=${SDK_MIN}"
EXTRA_CFLAGS+=" -m${SDKNAME_CFLAGS}-version-min=${SDK_MIN}"
LDFLAGS+=" -Wl,-${SDKNAME_LDFLAGS}_version_min,${SDK_MIN}"
EXTRA_LDFLAGS+=" -Wl,-${SDKNAME_LDFLAGS}_version_min,${SDK_MIN}"
if [ "$PLATFORM" = "OS" ]; then if [ "$PLATFORM" = "OS" ]; then
if [ "$ARCH" != "aarch64" ]; then if [ "$ARCH" != "aarch64" ]; then
...@@ -985,8 +994,8 @@ do ...@@ -985,8 +994,8 @@ do
BITCODE=yes BITCODE=yes
SDK_VERSION=`xcrun --sdk appletvos --show-sdk-version` SDK_VERSION=`xcrun --sdk appletvos --show-sdk-version`
SDK_MIN=10.2 SDK_MIN=10.2
OSVERSIONMINCFLAG=mtvos-version-min OSVERSIONMINCFLAG=tvos
OSVERSIONMINLDFLAG=tvos_version_min OSVERSIONMINLDFLAG=tvos
;; ;;
x) x)
MACOS=yes MACOS=yes
...@@ -994,8 +1003,8 @@ do ...@@ -994,8 +1003,8 @@ do
BITCODE=no BITCODE=no
SDK_VERSION=`xcrun --sdk macosx --show-sdk-version` SDK_VERSION=`xcrun --sdk macosx --show-sdk-version`
SDK_MIN=10.9 SDK_MIN=10.9
OSVERSIONMINCFLAG=mmacosx-version-min OSVERSIONMINCFLAG=macosx
OSVERSIONMINLDFLAG=macosx_version_min OSVERSIONMINLDFLAG=macosx
BUILD_DEVICE=yes BUILD_DEVICE=yes
FARCH=x86_64 FARCH=x86_64
BUILD_DYNAMIC_FRAMEWORK=yes BUILD_DYNAMIC_FRAMEWORK=yes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment