Support Xcode 9.3.1, allow version check override (#1588)

This commit is contained in:
Nikolay Igotti
2018-05-14 07:15:10 -07:00
committed by GitHub
parent f512b3b60a
commit 0c0446b56d
4 changed files with 21 additions and 15 deletions
+12 -10
View File
@@ -23,6 +23,8 @@ dependencyProfiles = default alt
# Don't check dependencies on a server.
# If true, dependency downloader will throw an exception if a dependency isn't found in konan.home.
airplaneMode = false
# if true, ignores Xcode version check.
ignoreXcodeVersionCheck = false
downloadingAttempts = 10
downloadingAttemptIntervalMs = 3000
@@ -33,10 +35,10 @@ llvmVersion = 5.0.0
# Mac OS X.
llvmHome.macos_x64 = clang-llvm-5.0.0-darwin-macos
targetToolchain.macos_x64 = target-toolchain-4-macos_x64
targetToolchain.macos_x64 = target-toolchain-5-macos_x64
arch.macos_x64 = x86_64
targetSysRoot.macos_x64 = target-sysroot-4-macos_x64
targetSysRoot.macos_x64 = target-sysroot-5-macos_x64
libffiDir.macos_x64 = libffi-3.2.1-2-darwin-macos
llvmLtoFlags.macos_x64 =
llvmLtoOptFlags.macos_x64 = -O3 -function-sections
@@ -54,24 +56,24 @@ dependencies.macos_x64 = \
libffi-3.2.1-2-darwin-macos \
clang-llvm-5.0.0-darwin-macos
target-sysroot-4-macos_x64.default = \
target-sysroot-5-macos_x64.default = \
remote:internal
target-toolchain-4-macos_x64.default = \
target-toolchain-5-macos_x64.default = \
remote:internal
# Apple iOS.
targetToolchain.macos_x64-ios_arm64 = target-toolchain-4-macos_x64
targetToolchain.macos_x64-ios_arm64 = target-toolchain-5-macos_x64
dependencies.macos_x64-ios_arm64 = \
libffi-3.2.1-2-darwin-ios \
clang-llvm-5.0.0-darwin-macos
target-sysroot-4-ios_arm64.default = \
target-sysroot-5-ios_arm64.default = \
remote:internal
arch.ios_arm64 = arm64
entrySelector.ios_arm64 = -alias _Konan_main _main
targetSysRoot.ios_arm64 = target-sysroot-4-ios_arm64
targetSysRoot.ios_arm64 = target-sysroot-5-ios_arm64
libffiDir.ios_arm64 = libffi-3.2.1-2-darwin-ios
llvmLtoFlags.ios_arm64 =
llvmLtoOptFlags.ios_arm64 = -O3 -function-sections
@@ -86,17 +88,17 @@ osVersionMinFlagClang.ios_arm64 = -miphoneos-version-min
osVersionMin.ios_arm64 = 8.0
# Apple iOS simulator.
targetToolchain.macos_x64-ios_x64 = target-toolchain-4-macos_x64
targetToolchain.macos_x64-ios_x64 = target-toolchain-5-macos_x64
dependencies.macos_x64-ios_x64 = \
libffi-3.2.1-1-darwin-ios_sim \
clang-llvm-5.0.0-darwin-macos
target-sysroot-4-ios_x64.default = \
target-sysroot-5-ios_x64.default = \
remote:internal
arch.ios_x64 = x86_64
entrySelector.ios_x64 = -alias _Konan_main _main
targetSysRoot.ios_x64 = target-sysroot-4-ios_x64
targetSysRoot.ios_x64 = target-sysroot-5-ios_x64
libffiDir.ios_x64 = libffi-3.2.1-1-darwin-ios_sim
llvmLtoFlags.ios_x64 =
llvmLtoOptFlags.ios_x64 = -O3 -function-sections
@@ -56,8 +56,10 @@ class AppleConfigurablesImpl(
properties.getProperty("useFixedXcodeVersion")?.let { requiredXcodeVersion ->
val currentXcodeVersion = xcode.version
if (currentXcodeVersion != requiredXcodeVersion) {
error("expected Xcode version $requiredXcodeVersion, got $currentXcodeVersion")
if (properties.getProperty("ignoreXcodeVersionCheck") != "true" &&
currentXcodeVersion != requiredXcodeVersion) {
error("expected Xcode version $requiredXcodeVersion, got $currentXcodeVersion, consider updating " +
"Xcode or use \"ignoreXcodeVersionCheck\" variable in konan.properties")
}
}
@@ -67,7 +67,7 @@ fun Properties.keepOnlyDefaultProfiles() {
// Force build to use only 'default' profile:
this.setProperty(DEPENDENCY_PROFILES_KEY, "default")
// Force build to use fixed Xcode version:
this.setProperty("useFixedXcodeVersion", "9.3")
this.setProperty("useFixedXcodeVersion", "9.3.1")
// TODO: it actually affects only resolution made in :dependencies,
// that's why we assume that 'default' profile comes first (and check this above).
}
+4 -2
View File
@@ -1,10 +1,12 @@
#!/usr/bin/env bash
KONAN_TOOLCHAIN_VERSION=4
SDKS="macosx iphoneos iphonesimulator"
KONAN_TOOLCHAIN_VERSION=5
SDKS="macosx iphoneos iphonesimulator watchos watchsimulator"
TARBALL_macosx=target-sysroot-$KONAN_TOOLCHAIN_VERSION-macos_x64
TARBALL_iphoneos=target-sysroot-$KONAN_TOOLCHAIN_VERSION-ios_arm64
TARBALL_iphonesimulator=target-sysroot-$KONAN_TOOLCHAIN_VERSION-ios_x64
TARBALL_watchos=target-sysroot-$KONAN_TOOLCHAIN_VERSION-watchos_arm32
TARBALL_watchsimulator=target-sysroot-$KONAN_TOOLCHAIN_VERSION-watchos_x64
TARBALL_xcode=target-toolchain-$KONAN_TOOLCHAIN_VERSION-macos_x64
OUT=`pwd`