@@ -521,10 +521,6 @@ cat > $swift_res_root/SDKSettings.json <<EOF
521
521
}
522
522
EOF
523
523
524
- # Copy necessary headers and libraries from the toolchain and NDK clang resource directories
525
- mkdir -p $swift_res_root /usr/lib/swift/clang/lib
526
- cp -r $host_toolchain /lib/clang/* /include $swift_res_root /usr/lib/swift/clang
527
-
528
524
for arch in $archs ; do
529
525
quiet_pushd ${sdk_staging} /${arch} /usr
530
526
rm -rf bin lib/clang local
@@ -546,14 +542,6 @@ for arch in $archs; do
546
542
mv lib/lib* .a lib/swift_static-$arch /android
547
543
548
544
ln -sv ../swift/clang lib/swift_static-$arch /clang
549
-
550
- # copy the clang libraries that we need to build for each architecture
551
- aarch=${arch/ armv7/ arm}
552
- mkdir -p lib/swift/clang/lib/linux/${aarch}
553
-
554
- # match clang version 21, 22, etc.
555
- cp -av ${ndk_installation} /lib/clang/[0-9]* /lib/linux/libclang_rt.builtins-${aarch} -android.a lib/swift/clang/lib/linux/
556
- cp -av ${ndk_installation} /lib/clang/[0-9]* /lib/linux/${aarch} /libunwind.a lib/swift/clang/lib/linux/${aarch} /
557
545
quiet_popd
558
546
559
547
# now sync the massaged sdk_root into the swift_res_root
618
606
cp -a ${ndk_prebuilt}/*/sysroot ${ndk_sysroot}
619
607
fi
620
608
609
+ # link the NDK's clang resource directory
610
+ ln -s ${ndk_prebuilt}/*/lib/clang/18 ${swift_resources}/usr/lib/swift/clang
611
+
621
612
# copy each architecture's swiftrt.o into the sysroot,
622
613
# working around https://github.com/swiftlang/swift/pull/79621
623
614
for folder in swift swift_static; do
0 commit comments