Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1520] Create Static Libraries with Swift #44129

Closed
swift-ci opened this issue May 14, 2016 · 2 comments
Closed

[SR-1520] Create Static Libraries with Swift #44129

swift-ci opened this issue May 14, 2016 · 2 comments
Labels
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

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1520
Radar rdar://problem/21006138
Original Reporter Coder-256 (JIRA User)
Type New Feature
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 8
Component/s Compiler
Labels New Feature
Assignee None
Priority Medium

md5: cbf166942ea50fa63373408448b4f338

is duplicated by:

  • SR-4564 Allow creating static libraries with Swift

relates to:

  • SR-2280 swiftc -static-stdlib option fails on Ubuntu 14.04 & 15.10

Issue Description:

As of now, it is impossible to create static libraries with any swift at all; pure or mixed with Objective-C. Before you tell me that I can use Frameworks, understand that this is not always an option. For example, when building a CLI, you need to embed everything into a single executable. This is possible with static libraries, but not frameworks. Because of this, the only way to create a CLI with any swift code at all (even if you just link to a 3rd party swift library) is by putting it in a statically defined location (ex. /Frameworks [which brings up many problems such as versioning and uninstallation], in a folder with the app, in some other search path, etc.).

Please consider adding support for building static libraries.

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 3, 2017

Comment by Jacek (JIRA)

Given the performance impact of having multiple dynamic frameworks, would it be possible to bump the priority for this feature?

@bob-wilson
Copy link

Beginning in Xcode 9.0 beta 4, you can now create static libraries containing Swift code.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation Xcode static libraries performance off topic Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.) and removed new feature compiler The Swift compiler in itself labels Nov 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
None yet
Development

No branches or pull requests

3 participants