From fbef7e0dca7604e11244999e0b7090e4f98f55b1 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 14 Oct 2017 23:56:08 +0200 Subject: [PATCH] Prefix iOS archs for consistency --- build-libssl.sh | 2 +- config/20-ios-tvos-cross.conf | 3 +-- scripts/build-loop-archs.sh | 13 +++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index c1abd24..2e2abdc 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -28,7 +28,7 @@ set -u DEFAULTVERSION="1.0.2l" # Default (=full) set of architectures (OpenSSL <= 1.0.2) or targets (OpenSSL >= 1.1.0) to build -DEFAULTARCHS="x86_64 i386 arm64 armv7s armv7 tv_x86_64 tv_arm64 mac_x86_64 mac_i386" +DEFAULTARCHS="ios_x86_64 ios_i386 ios_arm64 ios_armv7s ios_armv7 tv_x86_64 tv_arm64 mac_x86_64 mac_i386" DEFAULTTARGETS="ios-sim-cross-x86_64 ios-sim-cross-i386 ios64-cross-arm64 ios-cross-armv7s ios-cross-armv7 tvos-sim-cross-x86_64 tvos64-cross-arm64 macos64-x86_64 macos-i386" # Minimum iOS/tvOS SDK version to build for diff --git a/config/20-ios-tvos-cross.conf b/config/20-ios-tvos-cross.conf index bc52c0f..81bbb09 100644 --- a/config/20-ios-tvos-cross.conf +++ b/config/20-ios-tvos-cross.conf @@ -1,8 +1,7 @@ ## -*- mode: perl; -*- -## iOS configuration targets %targets = ( - ## Base settings for iOS-tvOS cross-compile + ## Base settings for cross-compile # Based on 10-main.conf: iphoneos-cross # Add generic compiler flags # Add embed-bitcode option if SDK version is 9 or higher diff --git a/scripts/build-loop-archs.sh b/scripts/build-loop-archs.sh index 824a5c8..9eca676 100755 --- a/scripts/build-loop-archs.sh +++ b/scripts/build-loop-archs.sh @@ -31,24 +31,21 @@ do fi # Determine platform, override arch for tvOS builds - if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]]; then + if [[ "${ARCH}" == "ios_x86_64" || "${ARCH}" == "ios_i386" ]]; then PLATFORM="iPhoneSimulator" elif [ "${ARCH}" == "tv_x86_64" ]; then - ARCH="x86_64" PLATFORM="AppleTVSimulator" elif [ "${ARCH}" == "tv_arm64" ]; then - ARCH="arm64" PLATFORM="AppleTVOS" - elif [ "${ARCH}" == "mac_x86_64" ]; then - ARCH="x86_64" - PLATFORM="MacOSX" - elif [ "${ARCH}" == "mac_i386" ]; then - ARCH="i386" + elif [[ "${ARCH}" == "mac_x86_64" || "${ARCH}" == "mac_i386" ]]; then PLATFORM="MacOSX" else PLATFORM="iPhoneOS" fi + # Extract ARCH from pseudo ARCH (part after first underscore) + ARCH=$(echo "${ARCH}" | sed -E 's|^[^_]*_(.+)$|\1|g') + # Set env vars for Configure export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"