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
504504rm -rf ${DESTINATION}
505505
506506# 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
509509 ANDROID_NDK_DESC="copied"
510510 cp -a ${PREBUILT}/*/sysroot ${DESTINATION}
511511else
@@ -518,9 +518,13 @@ else
518518 done
519519fi
520520
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
524528
525529echo "$(basename $0): success: ndk-sysroot ${ANDROID_NDK_DESC} to Android SDK"
526530EOF
You can’t perform that action at this time.
0 commit comments