From fd0b49779227df681a95b06fda9e96daa9e34c3c Mon Sep 17 00:00:00 2001 From: g4bor k0vacs Date: Tue, 7 Mar 2017 14:14:39 +0100 Subject: [PATCH] Disable embedding Bitcode: --disable-bitcode option added (for OpenSSL 1.0.2 and lower ONLY) --- build-libssl.sh | 10 ++++++++++ scripts/build-loop-archs.sh | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index e4cba5e..87c03cf 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -57,6 +57,7 @@ echo_help() echo "Options for OpenSSL 1.0.2 and lower ONLY" echo " --archs=\"ARCH ARCH ...\" Space-separated list of architectures to build" echo " Options: ${DEFAULTARCHS}" + echo " --disable-bitcode Disable embedding Bitcode" echo echo "Options for OpenSSL 1.1.0 and higher ONLY" echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods" @@ -189,6 +190,7 @@ ARCHS="" BRANCH="" CLEANUP="" CONFIG_ENABLE_EC_NISTP_64_GCC_128="" +CONFIG_DISABLE_BITCODE="" CONFIG_NO_DEPRECATED="" IOS_SDKVERSION="" LOG_VERBOSE="" @@ -218,6 +220,9 @@ case $i in --ec-nistp-64-gcc-128) CONFIG_ENABLE_EC_NISTP_64_GCC_128="true" ;; + --disable-bitcode) + CONFIG_DISABLE_BITCODE="true" + ;; -h|--help) echo_help exit @@ -372,6 +377,11 @@ echo "Build options" echo " OpenSSL version: ${VERSION}" if [ "${BUILD_TYPE}" == "archs" ]; then echo " Architectures: ${ARCHS}" + if [ "${CONFIG_DISABLE_BITCODE}" == "true" ]; then + echo " Bitcode disabled" + else + echo " Bitcode enabled" + fi else echo " Targets: ${TARGETS}" fi diff --git a/scripts/build-loop-archs.sh b/scripts/build-loop-archs.sh index 9b47fb8..fe68301 100755 --- a/scripts/build-loop-archs.sh +++ b/scripts/build-loop-archs.sh @@ -61,8 +61,10 @@ do fi # Embed bitcode for SDK >= 9 - if [[ "${SDKVERSION}" == 9.* || "${SDKVERSION}" == [0-9][0-9].* ]]; then - LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} -fembed-bitcode" + if [ "${CONFIG_DISABLE_BITCODE}" != "true" ]; then + if [[ "${SDKVERSION}" == 9.* || "${SDKVERSION}" == [0-9][0-9].* ]]; then + LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} -fembed-bitcode" + fi fi # Add platform specific config options