Browse Source

build: Group OBJCFLAGS for simulator with the other flags

David Fuhrmann 7 years ago
parent
commit
f883371dcb
1 changed files with 3 additions and 6 deletions
  1. 3 6
      compileAndBuildVLCKit.sh

+ 3 - 6
compileAndBuildVLCKit.sh

@@ -228,6 +228,9 @@ buildLibVLC() {
         fi
         fi
     else # Simulator platform
     else # Simulator platform
         LDFLAGS+=" -v"
         LDFLAGS+=" -v"
+
+        # Use the new ABI on simulator, else we can't build
+        OBJCFLAGS+=" -fobjc-abi-version=2 -fobjc-legacy-dispatch"
     fi
     fi
 
 
     if [ "$BITCODE" = "yes" ]; then
     if [ "$BITCODE" = "yes" ]; then
@@ -240,12 +243,6 @@ buildLibVLC() {
     export OBJCFLAGS="${OBJCFLAGS}"
     export OBJCFLAGS="${OBJCFLAGS}"
     export LDFLAGS="${LDFLAGS}"
     export LDFLAGS="${LDFLAGS}"
 
 
-    if [ "$PLATFORM" = "Simulator" ]; then
-        # Use the new ABI on simulator, else we can't build
-        export OBJCFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch ${OBJCFLAGS}"
-    fi
-
-
     spushd ${VLCROOT}/contrib
     spushd ${VLCROOT}/contrib
 
 
     info "Compiling third-party libraries"
     info "Compiling third-party libraries"