Skip to content

Commit ef3f51e

Browse files
committed
Only setup local toolchain if build-compiler is not 0
1 parent c527b1d commit ef3f51e

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

swift-ci/sdks/android/build-local

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ WORKDIR=$(realpath ${WORKDIR})
2525
HOST_OS=ubuntu$(lsb_release -sr)
2626
source ./scripts/toolchain-vars.sh
2727

28-
SWIFT_ROOT=${WORKDIR}/host-toolchain
29-
HOST_TOOLCHAIN=$SWIFT_ROOT/$SWIFT_BASE/usr
30-
if [[ ! -d "$HOST_TOOLCHAIN" ]]; then
31-
./scripts/install-swift.sh ${HOST_TOOLCHAIN}
32-
fi
28+
if [[ "${BUILD_COMPILER}" != "0" ]]; then
29+
SWIFT_ROOT=${WORKDIR}/host-toolchain
30+
HOST_TOOLCHAIN=$SWIFT_ROOT/$SWIFT_BASE/usr
31+
if [[ ! -d "$HOST_TOOLCHAIN" ]]; then
32+
./scripts/install-swift.sh ${HOST_TOOLCHAIN}
33+
fi
3334

34-
$HOST_TOOLCHAIN/bin/swift --version
35+
$HOST_TOOLCHAIN/bin/swift --version
3536

36-
# ensure the correct Swift is first in the PATH
37-
export PATH=$HOST_TOOLCHAIN/bin:$PATH
37+
# ensure the correct Swift is first in the PATH
38+
export PATH=$HOST_TOOLCHAIN/bin:$PATH
39+
fi
3840

3941
export ANDROID_NDK_HOME=${WORKDIR}/ndk/${ANDROID_NDK_VERSION}
4042

swift-ci/sdks/android/scripts/fetch-source.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ fi
8989
if [[ -z "${BORINGSSL_VERSION}" ]]; then
9090
BORINGSSL_VERSION=fips-20220613
9191
fi
92+
if [[ -z "${YAMS_VERSION}" ]]; then
93+
YAMS_VERSION=5.0.6
94+
fi
9295
if [[ -z "${SWIFT_ANDROID_PATCHES_VERSION}" ]]; then
9396
SWIFT_ANDROID_PATCHES_VERSION=main
9497
fi
@@ -158,10 +161,13 @@ fi
158161
popd >/dev/null
159162
groupend
160163

161-
# Fetch yams (needed for Swift 6.1.1)
164+
# Fetch yams (needed for Swift 6.1.x)
162165
groupstart "Fetching yams"
163166
pushd swift-project >/dev/null
164167
[[ -d yams ]] || git clone ${github}jpsim/Yams.git yams
168+
pushd libxml2 >/dev/null 2>&1
169+
git checkout ${YAMS_VERSION}
170+
popd >/dev/null 2>&1
165171
popd >/dev/null
166172
groupend
167173

0 commit comments

Comments
 (0)