44256db824
The next LLVM version will be 11.1.0, and we need to be sure that Xcode supports bitcode of this version. So we bump minimal Xcode version to 12.5, which should be OK, because by the time Kotlin 1.6.0 comes out, Xcode 12.5 will be around 6 month old. Also this commit simplifies tarball naming.
40 lines
1.5 KiB
Bash
Executable File
40 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# "brew install coreutils" for grealpath.
|
|
KONAN_TOOLCHAIN_VERSION=xcode_12_5
|
|
SDKS="macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"
|
|
TARBALL_macosx=target-sysroot-$KONAN_TOOLCHAIN_VERSION-macosx
|
|
TARBALL_iphoneos=target-sysroot-$KONAN_TOOLCHAIN_VERSION-iphoneos
|
|
TARBALL_iphonesimulator=target-sysroot-$KONAN_TOOLCHAIN_VERSION-iphonesimulator
|
|
TARBALL_appletvos=target-sysroot-$KONAN_TOOLCHAIN_VERSION-appletvos
|
|
TARBALL_appletvsimulator=target-sysroot-$KONAN_TOOLCHAIN_VERSION-appletvsimulator
|
|
TARBALL_watchos=target-sysroot-$KONAN_TOOLCHAIN_VERSION-watchos
|
|
TARBALL_watchsimulator=target-sysroot-$KONAN_TOOLCHAIN_VERSION-watchsimulator
|
|
TARBALL_xcode=target-toolchain-$KONAN_TOOLCHAIN_VERSION
|
|
TARBALL_xcode_addon=xcode-addon-$KONAN_TOOLCHAIN_VERSION
|
|
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/HS' ."
|
|
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/HS' ."
|
|
|
|
t=`xcrun -f bitcode-build-tool`
|
|
t=`dirname $t`
|
|
t=`grealpath $t/..`
|
|
tarball=$TARBALL_xcode_addon
|
|
echo "Packing additional tools $OUT/$tarball.tar.gz..."
|
|
$SHELL -c "tar czf $OUT/$tarball.tar.gz -C $t -s '/^\./$tarball/HS' ."
|