File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,30 @@ API=28
10
10
SDKROOT=${TMPDIR:-/ tmp} /swift-android-sdk
11
11
mkdir -p ${SDKROOT}
12
12
13
+ # Install a Swift host toolchain if it isn't already present
14
+ SWIFT_ROOT=${SDKROOT} /host-toolchain
15
+ HOST_ARCH=ubuntu24.04
16
+ SWIFT_VERSION=6.1
17
+ SWIFT_TAG=" swift-${SWIFT_VERSION} -RELEASE"
18
+ SWIFT_BRANCH=" swift-$( echo $SWIFT_TAG | cut -d- -f2) -release"
19
+ SWIFT_BASE=$SWIFT_TAG -$HOST_ARCH
20
+
21
+ if [[ ! -d $SWIFT_ROOT ]]; then
22
+ mkdir -p $SWIFT_ROOT
23
+ pushd $SWIFT_ROOT
24
+
25
+
26
+ SWIFT_URL=" https://download.swift.org/$SWIFT_BRANCH /$( echo $HOST_ARCH | tr -d ' .' ) /$SWIFT_TAG /$SWIFT_BASE .tar.gz"
27
+ wget -q $SWIFT_URL
28
+ tar xzf $SWIFT_BASE .tar.gz
29
+
30
+ popd
31
+ fi
32
+
33
+ $SWIFT_ROOT /$SWIFT_BASE /usr/bin/swift --version
34
+ # ensure the correct Swift is first in the PATH
35
+ export PATH=$SWIFT_ROOT /$SWIFT_BASE /usr/bin:$PATH
36
+
13
37
# fetch the patches
14
38
PATCHDIR=${SDKROOT} /patches
15
39
if [[ ! -d ${PATCHDIR} ]]; then
You can’t perform that action at this time.
0 commit comments