Update toolchain. (#1456)

This commit is contained in:
Nikolay Igotti
2018-03-30 19:00:48 +03:00
committed by GitHub
parent 790fd11d90
commit e1e4a5ce82
3 changed files with 37 additions and 12 deletions
+10 -10
View File
@@ -33,10 +33,10 @@ llvmVersion = 5.0.0
# Mac OS X.
llvmHome.macos_x64 = clang-llvm-5.0.0-darwin-macos
targetToolchain.macos_x64 = target-toolchain-1-osx
targetToolchain.macos_x64 = target-toolchain-4-macos_x64
arch.macos_x64 = x86_64
targetSysRoot.macos_x64 = target-sysroot-2-darwin-macos
targetSysRoot.macos_x64 = target-sysroot-4-macos_x64
libffiDir.macos_x64 = libffi-3.2.1-2-darwin-macos
llvmLtoFlags.macos_x64 =
llvmLtoOptFlags.macos_x64 = -O3 -function-sections
@@ -54,24 +54,24 @@ dependencies.macos_x64 = \
libffi-3.2.1-2-darwin-macos \
clang-llvm-5.0.0-darwin-macos
target-sysroot-2-darwin-macos.default = \
target-sysroot-4-macos_x64.default = \
remote:internal
target-toolchain-1-osx.default = \
target-toolchain-4-macos_x64.default = \
remote:internal
# Apple iOS.
targetToolchain.macos_x64-ios_arm64 = target-toolchain-1-osx
targetToolchain.macos_x64-ios_arm64 = target-toolchain-4-macos_x64
dependencies.macos_x64-ios_arm64 = \
libffi-3.2.1-2-darwin-ios \
clang-llvm-5.0.0-darwin-macos
target-sysroot-3-darwin-ios.default = \
target-sysroot-4-ios_arm64.default = \
remote:internal
arch.ios_arm64 = arm64
entrySelector.ios_arm64 = -alias _Konan_main _main
targetSysRoot.ios_arm64 = target-sysroot-3-darwin-ios
targetSysRoot.ios_arm64 = target-sysroot-4-ios_arm64
libffiDir.ios_arm64 = libffi-3.2.1-2-darwin-ios
llvmLtoFlags.ios_arm64 =
llvmLtoOptFlags.ios_arm64 = -O3 -function-sections
@@ -86,17 +86,17 @@ osVersionMinFlagClang.ios_arm64 = -miphoneos-version-min
osVersionMin.ios_arm64 = 8.0
# Apple iOS simulator.
targetToolchain.macos_x64-ios_x64 = target-toolchain-1-osx
targetToolchain.macos_x64-ios_x64 = target-toolchain-4-macos_x64
dependencies.macos_x64-ios_x64 = \
libffi-3.2.1-1-darwin-ios_sim \
clang-llvm-5.0.0-darwin-macos
target-sysroot-2-darwin-ios_sim.default = \
target-sysroot-4-ios_x64.default = \
remote:internal
arch.ios_x64 = x86_64
entrySelector.ios_x64 = -alias _Konan_main _main
targetSysRoot.ios_x64 = target-sysroot-2-darwin-ios_sim
targetSysRoot.ios_x64 = target-sysroot-4-ios_x64
libffiDir.ios_x64 = libffi-3.2.1-1-darwin-ios_sim
llvmLtoFlags.ios_x64 =
llvmLtoOptFlags.ios_x64 = -O3 -function-sections
@@ -40,7 +40,7 @@ abstract class KonanPropertiesLoader(override val target: KonanTarget, val prope
override fun targetString(key: String): String?
= properties.targetString(key, target)
override fun targetList(key: String): List<String>
override fun targetList(key: String): List<String>
= properties.targetList(key, target)
override fun hostString(key: String): String?
= properties.hostString(key)
@@ -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.2")
this.setProperty("useFixedXcodeVersion", "9.3")
// TODO: it actually affects only resolution made in :dependencies,
// that's why we assume that 'default' profile comes first (and check this above).
}
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
KONAN_TOOLCHAIN_VERSION=4
SDKS="macosx iphoneos iphonesimulator"
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_xcode=target-toolchain-$KONAN_TOOLCHAIN_VERSION-macos_x64
OUT=`pwd`
for s in $SDKS; do
p=`xcrun --sdk $s --show-sdk-path`
p=`grealpath $p`
tarball_var=TARBALL_${s}
tarball=${!tarball_var}
echo "Packing SDK $s as $OUT/$tarball.tar.gz..."
$SHELL -c "tar czf $OUT/$tarball.tar.gz -C $p -s '/^\./$tarball/' ."
done
t=`xcrun -f ld`
t=`dirname $t`
t=`grealpath $t/../..`
tarball=$TARBALL_xcode
echo "Packing toolchain $OUT/$tarball.tar.gz..."
$SHELL -c "tar czf $OUT/$tarball.tar.gz -C $t -s '/^\./$tarball/' ."