ref: 70d8d72ffee5c510a90d55940f995ce48a91dcbe
parent: 553c68dca1dd17590dbefde732191700cb75aade
author: Johann <johannkoenig@google.com>
date: Wed Oct 30 12:05:18 EDT 2019
darwin: disable compiler checks When configuring with --enable-external-build the .mk files are not expected to work. This avoids some spurious warnings when configuring for darwin targets on other platforms. Fixed: webm:1535 Change-Id: Idac2b397db1b595ba7ea9231c4eb835b6013abdc
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1081,60 +1081,62 @@
;;
darwin*)
- XCRUN_FIND="xcrun --sdk iphoneos --find"
- CXX="$(${XCRUN_FIND} clang++)"
- CC="$(${XCRUN_FIND} clang)"
- AR="$(${XCRUN_FIND} ar)"
- AS="$(${XCRUN_FIND} as)"
- STRIP="$(${XCRUN_FIND} strip)"
- NM="$(${XCRUN_FIND} nm)"
- RANLIB="$(${XCRUN_FIND} ranlib)"
- AS_SFX=.S
- LD="${CXX:-$(${XCRUN_FIND} ld)}"
+ if disabled external_build; then
+ XCRUN_FIND="xcrun --sdk iphoneos --find"
+ CXX="$(${XCRUN_FIND} clang++)"
+ CC="$(${XCRUN_FIND} clang)"
+ AR="$(${XCRUN_FIND} ar)"
+ AS="$(${XCRUN_FIND} as)"
+ STRIP="$(${XCRUN_FIND} strip)"
+ NM="$(${XCRUN_FIND} nm)"
+ RANLIB="$(${XCRUN_FIND} ranlib)"
+ AS_SFX=.S
+ LD="${CXX:-$(${XCRUN_FIND} ld)}"
- # ASFLAGS is written here instead of using check_add_asflags
- # because we need to overwrite all of ASFLAGS and purge the
- # options that were put in above
- ASFLAGS="-arch ${tgt_isa} -g"
+ # ASFLAGS is written here instead of using check_add_asflags
+ # because we need to overwrite all of ASFLAGS and purge the
+ # options that were put in above
+ ASFLAGS="-arch ${tgt_isa} -g"
- add_cflags -arch ${tgt_isa}
- add_ldflags -arch ${tgt_isa}
+ add_cflags -arch ${tgt_isa}
+ add_ldflags -arch ${tgt_isa}
- alt_libc="$(show_darwin_sdk_path iphoneos)"
- if [ -d "${alt_libc}" ]; then
- add_cflags -isysroot ${alt_libc}
- fi
+ alt_libc="$(show_darwin_sdk_path iphoneos)"
+ if [ -d "${alt_libc}" ]; then
+ add_cflags -isysroot ${alt_libc}
+ fi
- if [ "${LD}" = "${CXX}" ]; then
- add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
- else
- add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
- fi
+ if [ "${LD}" = "${CXX}" ]; then
+ add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
+ else
+ add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
+ fi
- for d in lib usr/lib usr/lib/system; do
- try_dir="${alt_libc}/${d}"
- [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
- done
+ for d in lib usr/lib usr/lib/system; do
+ try_dir="${alt_libc}/${d}"
+ [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
+ done
- case ${tgt_isa} in
- armv7|armv7s|armv8|arm64)
- if enabled neon && ! check_xcode_minimum_version; then
- soft_disable neon
- log_echo " neon disabled: upgrade Xcode (need v6.3+)."
- if enabled neon_asm; then
- soft_disable neon_asm
- log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
+ case ${tgt_isa} in
+ armv7|armv7s|armv8|arm64)
+ if enabled neon && ! check_xcode_minimum_version; then
+ soft_disable neon
+ log_echo " neon disabled: upgrade Xcode (need v6.3+)."
+ if enabled neon_asm; then
+ soft_disable neon_asm
+ log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
+ fi
fi
- fi
- ;;
- esac
+ ;;
+ esac
- asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
+ 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
+ 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
fi
;;