Disable embedding Bitcode: --disable-bitcode option added (for OpenSSL 1.0.2 and lower ONLY)

This commit is contained in:
g4bor k0vacs 2017-03-07 14:14:39 +01:00
parent f5f3bee244
commit fd0b497792
2 changed files with 14 additions and 2 deletions

View File

@ -57,6 +57,7 @@ echo_help()
echo "Options for OpenSSL 1.0.2 and lower ONLY" echo "Options for OpenSSL 1.0.2 and lower ONLY"
echo " --archs=\"ARCH ARCH ...\" Space-separated list of architectures to build" echo " --archs=\"ARCH ARCH ...\" Space-separated list of architectures to build"
echo " Options: ${DEFAULTARCHS}" echo " Options: ${DEFAULTARCHS}"
echo " --disable-bitcode Disable embedding Bitcode"
echo echo
echo "Options for OpenSSL 1.1.0 and higher ONLY" echo "Options for OpenSSL 1.1.0 and higher ONLY"
echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods" echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods"
@ -189,6 +190,7 @@ ARCHS=""
BRANCH="" BRANCH=""
CLEANUP="" CLEANUP=""
CONFIG_ENABLE_EC_NISTP_64_GCC_128="" CONFIG_ENABLE_EC_NISTP_64_GCC_128=""
CONFIG_DISABLE_BITCODE=""
CONFIG_NO_DEPRECATED="" CONFIG_NO_DEPRECATED=""
IOS_SDKVERSION="" IOS_SDKVERSION=""
LOG_VERBOSE="" LOG_VERBOSE=""
@ -218,6 +220,9 @@ case $i in
--ec-nistp-64-gcc-128) --ec-nistp-64-gcc-128)
CONFIG_ENABLE_EC_NISTP_64_GCC_128="true" CONFIG_ENABLE_EC_NISTP_64_GCC_128="true"
;; ;;
--disable-bitcode)
CONFIG_DISABLE_BITCODE="true"
;;
-h|--help) -h|--help)
echo_help echo_help
exit exit
@ -372,6 +377,11 @@ echo "Build options"
echo " OpenSSL version: ${VERSION}" echo " OpenSSL version: ${VERSION}"
if [ "${BUILD_TYPE}" == "archs" ]; then if [ "${BUILD_TYPE}" == "archs" ]; then
echo " Architectures: ${ARCHS}" echo " Architectures: ${ARCHS}"
if [ "${CONFIG_DISABLE_BITCODE}" == "true" ]; then
echo " Bitcode disabled"
else
echo " Bitcode enabled"
fi
else else
echo " Targets: ${TARGETS}" echo " Targets: ${TARGETS}"
fi fi

View File

@ -61,9 +61,11 @@ do
fi fi
# Embed bitcode for SDK >= 9 # Embed bitcode for SDK >= 9
if [ "${CONFIG_DISABLE_BITCODE}" != "true" ]; then
if [[ "${SDKVERSION}" == 9.* || "${SDKVERSION}" == [0-9][0-9].* ]]; then if [[ "${SDKVERSION}" == 9.* || "${SDKVERSION}" == [0-9][0-9].* ]]; then
LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} -fembed-bitcode" LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} -fembed-bitcode"
fi fi
fi
# Add platform specific config options # Add platform specific config options
if [[ "${PLATFORM}" == AppleTV* ]]; then if [[ "${PLATFORM}" == AppleTV* ]]; then