SwiftPM compile multiple arch system library

The easiest thing to do to get a correct output here is to use xcodebuild to build your binary instead of swift build. At this time, the xcbuild backend for SwiftPM is not well supported, but using xcodebuild will work just fine. You can use xcodebuild -list to find the schemes that are automatically synthesised, and then build the appropriate one to get the binaries.

1 Like