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

Fix fake4swift duplicate symbol warnings #5

Merged
merged 4 commits into from
Jan 12, 2016

Conversation

briancroom
Copy link
Contributor

Xcode always statically links the Swift stdlib into CLI applications. Combined with the dynamically-linked stdlib loaded by the various frameworks leads to these warnings about two instances of these symbols existing in the process.

This PR works around that problem by building fake4swift as a Mac app, which dynamically links the stdlib, and then copying the binary and embedded frameworks out of the .app and into the installation directory. This technique was first (AFAICT) popularized by Carthage (see Carthage/Carthage#16 or Carthage/Commandant#28), which has a similar setup.

@tjarratt
Copy link
Owner

This is awesome!

tjarratt added a commit that referenced this pull request Jan 12, 2016
Fix fake4swift duplicate symbol warnings
@tjarratt tjarratt merged commit 73bf311 into tjarratt:master Jan 12, 2016
@briancroom briancroom deleted the build_fixes branch January 12, 2016 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants