Experimental Cross Compilation Support for SwiftPM [patch open for reviews]

Hi swift-build-dev,

Given an appropriate SDK/toolchain, swiftc&clang are both able to cross compile binaries for other platforms. When building iOS/tvOS/watchOS apps with Xcode or Swift's Android support, we're already using these features extensively. SwiftPM however was until now only ever able to produce binaries for your host OS. I just posted a PR to GitHub [1] that adds experimental support for compiling binaries for different destinations. In other words, you'll for example be able to produce a Ubuntu binary on your Mac :sunglasses:.

So if you're interested, please have a look and comment on the PR! Contributions/discussions more than welcome.

Details in the pull request [1]. Any questions, please let me know!



[1]: cross compilation support (configurable destinations) by weissi · Pull Request #1098 · apple/swift-package-manager · GitHub