]> granicus.if.org Git - libvpx/commitdiff
build/make/configure.sh: Embed bitcode in arm darwin targets.
authorTom Finegan <tomfinegan@google.com>
Thu, 24 Sep 2015 21:55:51 +0000 (14:55 -0700)
committerTom Finegan <tomfinegan@google.com>
Thu, 24 Sep 2015 22:11:15 +0000 (15:11 -0700)
When the iOS SDK major version is 9 or higher:
- Pass -fembed-bitcode to compiler, assembler, and linker.
- Add a warning for simulator targets since yasm doesn't know
  what -fembed-bitcode means, and exits with an error.

BUG=https://code.google.com/p/webm/issues/detail?id=1075

Change-Id: I38c997a0225e53c5dd1b4ddf7935d21362953f76

build/make/configure.sh

index c73e7873468744f78055e1b4971cec7ec7b4d66e..8a5f56b63ba190d0ea1b819cef5f2ddb0d8edc91 100644 (file)
@@ -1044,6 +1044,12 @@ EOF
           done
 
           asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
+
+          if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
+            check_add_cflags -fembed-bitcode
+            check_add_asflags -fembed-bitcode
+            check_add_ldflags -fembed-bitcode
+          fi
           ;;
 
         linux*)
@@ -1253,6 +1259,13 @@ EOF
           enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
           add_cflags  ${sim_arch}
           add_ldflags ${sim_arch}
+
+          if [ "$(show_darwin_sdk_major_version iphonesimulator)" -gt 8 ]; then
+            # yasm v1.3.0 doesn't know what -fembed-bitcode means, so turning it
+            # on is pointless (unless building a C-only lib). Warn the user, but
+            # do nothing here.
+            log "Warning: Bitcode embed disabled for simulator targets."
+          fi
           ;;
         os2)
           add_asflags -f aout