Okay, this is the script for Android. I would be happy to fix anything that looks wrong to those of you smarter than I.
Workaround Notes:
- SwiftPM isn’t in the cross‐compilation toolchain, so two toolchains are needed at once.
- SwiftPM must be ≤ 5.1.1; newer releases suffer from SR‐12123.
-
libswiftSwiftOnoneSupport.soandlibswiftGlibc.soneed linkage adjustments. (See earlier posts.) - SwiftPM insists on the wrong
--sysroot, so the contents of the realsysrootneed to be copyied to where it points. -
libicudt64.soneeds to be acquired separately. - (I haven’t bothered with
FoundationNetworkingorFoundationXMLyet; they have additional dependencies.)