File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
swift-ci/sdks/android/scripts Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -483,12 +483,30 @@ if [ -z "${ANDROID_NDK_HOME}" ]; then
483
483
echo "$(basename $0): error: missing environment variable ANDROID_NDK_HOME"
484
484
exit 1
485
485
fi
486
+
486
487
ndk_prebuilt="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt"
487
488
if [ ! -d "${ndk_prebuilt}" ]; then
488
489
echo "$(basename $0): error: ANDROID_NDK_HOME not found: ${ndk_prebuilt}"
489
490
exit 1
490
491
fi
491
492
493
+ ndk_sysroot=${ndk_prebuilt}/linux-x86_64/sysroot
494
+
495
+ ln -sf "${host_toolchain}/lib/swift" "${ndk_sysroot}/usr/lib"
496
+
497
+ # ensure that the expected compiler resource is found
498
+ ls -la s/usr/local/ndk/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift/android/x86_64/swiftrt.o
499
+
500
+ ## need to fixup swiftrt.o in ANDROID_NDK_HOME
501
+ #host_swift_dir=$(dirname $(dirname $(which swift)))
502
+ #for folder in swift swift_static; do
503
+ # for swiftrt in ${swift_resources}/usr/lib/${folder}-*/android/*/swiftrt.o; do
504
+ # arch=$(basename $(dirname ${swiftrt}))
505
+ # mkdir -p ${ndk_sysroot}/usr/lib/${folder}/android/${arch}
506
+ # cp -av ${swiftrt} ${ndk_sysroot}/usr/lib/${folder}/android/${arch}/
507
+ # done
508
+ #done
509
+
492
510
#Pkg.Revision = 27.0.12077973
493
511
#Pkg.Revision = 28.1.13356709
494
512
ndk_version=$(grep '^Pkg.Revision = ' "${ANDROID_NDK_HOME}/source.properties" | cut -f3- -d' ' | cut -f 1 -d '.')
You can’t perform that action at this time.
0 commit comments