-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
Binary targets are a vital part of the SwiftPM ecosystem and currently any discussions about extending the format or expanding usage of this format (or xcframeworks) in general are limited due to the packaging tool being included as part of xcodebuild. Interestingly, computing the checksum for a binary target is included as part of the swift package
suite of tools, but not the creation of said package.
I believe migrating this functionality from xcodebuild to SwiftPM would be advantageous as it could open up discussions to make SwiftPM even more useful on non-Darwin platforms that want to use Swift.
Expected behavior
I'd like to write something like the following:
swift package create-xcframework -framework <path> [-framework <path>...] -output <path>
or
swift package -create-xcframework -library <path> [-headers <path>] [-library <path> [-headers <path>]...] -output <path>
Which would create the framework similarly as it does when running the command from xcodebuild
Actual behavior
This command doesn't exist today and you're forced to run xcodebuild -create-xcframework
on macOS.
Steps to reproduce
- Launch a Linux or Windows installation that has Swift installed
- Attempt to run either
xcodebuild -create-xcframework ...
orswift package create-xcframework ...
and see that it doesn't work
Swift Package Manager version/commit hash
Swift Package Manager - Swift 5.9.0
Swift & OS version (output of swift --version && uname -a
)
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx14.0
Darwin zerocool.localdomain 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 arm64