[SR-4564] Allow creating static libraries with Swift #47141
Labels
compiler
The Swift compiler in itself
duplicate
Resolution: Duplicates another issue
feature
A feature request or implementation
off topic
Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)
performance
static libraries
Xcode
Additional Detail from JIRA
md5: b447988d2bf1f8612f82ef152beadbbc
duplicates:
Issue Description:
Today we cannot build static libraries that contain Swift code. Only dynamic libraries (Frameworks) are supported.
For iOS apps this has a significant disadvantage related to slower app launch time.
Apple recommends having not more than 6 frameworks loaded dynamically (https://developer.apple.com/videos/play/wwdc2016/406/).
For larger Swift apps this constraint (6 dylibs) is too restrictive. One reason is modularization - it's easier for the development cycles and speed of iteration to work with smaller modules, and also to be able to use 3rd party Swift libraries. Another reason to use more modules is build speed. We've found Swift compiler's build times to be impacted badly as the number of files per module grows.
For those reasons, we need to be able to link statically, so we can modularize our application properly, iterate faster and easier, and not impact application boot times with dylib overhead.
The text was updated successfully, but these errors were encountered: