Skip to content

Commit

Permalink
MACOSX/IPHONE: Upgrade to LLVM 11
Browse files Browse the repository at this point in the history
For iPhone where we need compiler-rt, try several patch versions when
the compiler one is not available (CLang PPA is development build)

Upgrade cctools-port at the same time.
  • Loading branch information
lephilousophe committed Dec 20, 2020
1 parent cf9c01a commit 0e51145
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion toolchains/iphone/Dockerfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM toolchains/common AS helpers
FROM toolchains/apple-sdks AS sdks

m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`IPHONE_SDK_VERSION',14.3)m4_dnl
m4_define(`IPHONEOS_DEPLOYMENT_TARGET',7.0)m4_dnl

Expand Down
17 changes: 14 additions & 3 deletions toolchains/iphone/packages/compiler-rt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,23 @@ CLANG_INCLUDE_DIR="${CLANG_LIB_DIR}/include"
CLANG_DARWIN_LIB_DIR="${CLANG_LIB_DIR}/lib/darwin"

# Don't support below 4.x and master to simplify
CLANG_MAJOR=${CLANG_VERSION%%.*}
BRANCH=release/$CLANG_MAJOR.x

#CLANG_MAJOR=${CLANG_VERSION%%.*}
#BRANCH=release/$CLANG_MAJOR.x
#do_git_fetch llvm-project "https://github.com/llvm/llvm-project.git" "${BRANCH}"
#cd compiler-rt

CLANG_PATCH=${CLANG_VERSION##*.}
CLANG_MAJMIN=${CLANG_VERSION%.*}
# --spider doesn't work with Github/AWS so just do a 1 byte download to /dev/null
while ! wget --header='Range: bytes=0-0' -O /dev/null \
"https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/compiler-rt-${CLANG_VERSION}.src.tar.xz"; do
if [ "$CLANG_PATCH" -eq 0 ]; then
exit 1
fi
CLANG_PATCH=$(($CLANG_PATCH - 1))
CLANG_VERSION=${CLANG_MAJMIN}.${CLANG_PATCH}
done

do_http_fetch compiler-rt "https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/compiler-rt-${CLANG_VERSION}.src.tar.xz" 'tar xJf'

# We try to support as much versions as we can so fallback on a common ground and fix it
Expand Down
2 changes: 1 addition & 1 deletion toolchains/iphone/packages/toolchain/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh

CCTOOLS_PORT_VERSION=634a084377ee2e2932c66459b0396edf76da2e9f
CCTOOLS_PORT_VERSION=30518813875aed656aa7f18b6d485feee25f8f87
export LDID_VERSION=4bf8f4d60384a0693dbbe2084ce62a35bfeb87ab

PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
Expand Down
2 changes: 1 addition & 1 deletion toolchains/macosx-i386/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This worker is used for old i386 only Mac
m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`MACOSX_SDK_VERSION',10.13)m4_dnl
m4_define(`MACOSX_TARGET_ARCH',i386)m4_dnl
m4_define(`MACOSX_TARGET_VERSION',17)m4_dnl
Expand Down
2 changes: 1 addition & 1 deletion toolchains/macosx/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`MACOSX_SDK_VERSION',11.1)m4_dnl
m4_define(`MACOSX_TARGET_ARCH',x86_64)m4_dnl
m4_define(`MACOSX_TARGET_VERSION',21)m4_dnl
Expand Down
2 changes: 1 addition & 1 deletion workers/iphone/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM toolchains/iphone AS toolchain

m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`IPHONE_SDK_VERSION',14.3)m4_dnl
m4_define(`IPHONEOS_DEPLOYMENT_TARGET',7.0)m4_dnl

Expand Down
2 changes: 1 addition & 1 deletion workers/macosx-i386/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This worker is used for old i386 only Mac
m4_define(`TOOLCHAIN',macosx-i386)m4_dnl
m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`MACOSX_SDK_VERSION',10.13)m4_dnl
m4_define(`MACOSX_TARGET_ARCH',i386)m4_dnl
m4_define(`MACOSX_TARGET_VERSION',17)m4_dnl
Expand Down
2 changes: 1 addition & 1 deletion workers/macosx/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
m4_define(`TOOLCHAIN',macosx)m4_dnl
m4_dnl These settings must be kept in sync between toolchain and worker
m4_define(`PPA_CLANG',-10)m4_dnl
m4_define(`PPA_CLANG',-11)m4_dnl
m4_define(`MACOSX_SDK_VERSION',11.1)m4_dnl
m4_define(`MACOSX_TARGET_ARCH',x86_64)m4_dnl
m4_define(`MACOSX_TARGET_VERSION',21)m4_dnl
Expand Down

0 comments on commit 0e51145

Please sign in to comment.