Commit 9194f3c0 authored by Tom Finegan's avatar Tom Finegan
Browse files

build/make/ Embed bitcode in arm darwin targets.

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.


Change-Id: I38c997a0225e53c5dd1b4ddf7935d21362953f76
parent 20b770ee
...@@ -1044,6 +1044,12 @@ EOF ...@@ -1044,6 +1044,12 @@ EOF
done done
asm_conversion_cmd="${source_path}/build/make/" asm_conversion_cmd="${source_path}/build/make/"
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
;; ;;
linux*) linux*)
...@@ -1253,6 +1259,13 @@ EOF ...@@ -1253,6 +1259,13 @@ EOF
enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64" enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
add_cflags ${sim_arch} add_cflags ${sim_arch}
add_ldflags ${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."
;; ;;
os2) os2)
add_asflags -f aout add_asflags -f aout
Supports Markdown
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