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.so
andlibswiftGlibc.so
need linkage adjustments. (See earlier posts.) - SwiftPM insists on the wrong
--sysroot
, so the contents of the realsysroot
need to be copyied to where it points. -
libicudt64.so
needs to be acquired separately. - (I haven’t bothered with
FoundationNetworking
orFoundationXML
yet; they have additional dependencies.)