Skip to content

Commit 6ac3365

Browse files
committed
Swift Android build 6.2
1 parent 48e255c commit 6ac3365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

swift-ci/sdks/android/scripts/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ HOST=linux-x86_64
218218
#HOST=$(uname -s -m | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
219219
ndk_installation=$ndk_home/toolchains/llvm/prebuilt/$HOST
220220

221-
222221
echo "Swift found at ${swift_dir}"
223222
echo "Host toolchain found at ${host_toolchain}"
224223
${host_toolchain}/bin/swift --version
@@ -503,9 +502,10 @@ if [ "${NDK_LOCATION}" = "external" ]; then
503502
# clang: error: no such file or directory: '${HOME}/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-04-24-a-android-0.1.artifactbundle/swift-android/ndk-sysroot/usr/lib/swift/android/x86_64/swiftrt.o'
504503
# see: https://github.com/swiftlang/swift-driver/pull/1822#issuecomment-2762811807
505504
if [ "${NDK_LOCATION}" = "external" ]; then
506-
SWIFTRT=android/x86_64/swiftrt.o
507-
mkdir -p ${ndk_sysroot}/usr/lib/swift/android/x86_64
508-
ln -srv ${swift_res_root}/usr/lib/swift-x86_64/${SWIFTRT} ${ndk_sysroot}/usr/lib/swift/${SWIFTRT}
505+
for arch in $archs; do
506+
mkdir -p ${ndk_sysroot}/usr/lib/swift/android/${arch}
507+
ln -srv ${swift_res_root}/usr/lib/swift-${arch}/android/${arch}/swiftrt.o ${ndk_sysroot}/usr/lib/swift/android/${arch}/swiftrt.o
508+
done
509509
else
510510
# try brute copying swiftrt.o to EVERY directory to see if it gets picked up somehow
511511
echo "Seeking workaround for swiftrt.o needing to be under sdkRoot"

0 commit comments

Comments
 (0)