File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
swift-ci/sdks/android/scripts Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -504,8 +504,8 @@ DESTINATION=$(dirname $(dirname $(realpath $0)))/ndk-sysroot
504
504
rm -rf ${DESTINATION}
505
505
506
506
# copy vs. link the NDK files
507
- ANDROID_NDK_LINK =${ANDROID_NDK_LINK :-1}
508
- if [[ "${ANDROID_NDK_LINK }" != 1 ]]; then
507
+ SWIFT_ANDROID_NDK_LINK =${SWIFT_ANDROID_NDK_LINK :-1}
508
+ if [[ "${SWIFT_ANDROID_NDK_LINK }" != 1 ]]; then
509
509
ANDROID_NDK_DESC="copied"
510
510
cp -a ${PREBUILT}/*/sysroot ${DESTINATION}
511
511
else
@@ -518,9 +518,13 @@ else
518
518
done
519
519
fi
520
520
521
- # copy each architecture's swiftrt.o into the sysroot
522
- mkdir -p ${DESTINATION}/usr/lib/swift/android
523
- cp -a ${DESTINATION}/../swift-resources/usr/lib/swift-*/android/* ${DESTINATION}/usr/lib/swift/android/
521
+ # copy each architecture's swiftrt.o into the sysroot,
522
+ # working around https://github.com/swiftlang/swift/pull/79621
523
+ for swiftrt in ${DESTINATION}/../swift-resources/usr/lib/swift-*/android/*/swiftrt.o; do
524
+ arch=$(basename $(dirname ${swiftrt}))
525
+ mkdir -p ${DESTINATION}/usr/lib/swift/android/${arch}
526
+ cp -a ${swiftrt} ${DESTINATION}/usr/lib/swift/android/${arch}
527
+ done
524
528
525
529
echo "$(basename $0): success: ndk-sysroot ${ANDROID_NDK_DESC} to Android SDK"
526
530
EOF
You can’t perform that action at this time.
0 commit comments