[swift-dev] Building Static Binaries and Libs

Daniel Dunbar daniel_dunbar at apple.com
Mon Sep 5 13:03:19 CDT 2016


> On Sep 5, 2016, at 4:13 AM, Joel Hughes via swift-dev <swift-dev at swift.org> wrote:
> 
> Hello,
> 
> I hope that this is the right channel for this type of question?
> 
> I've previously asked in swift-users about building a static binary, on Linux, using:
> 
> swift build -Xswiftc -static-stdlib
> 
> It works for simple programs but fails on those importing Foundation.
> 
> I was pointed at this bug/feature-request and was thinking of taking it on but might not have the time/skills to complete it: https://bugs.swift.org/browse/SR-648 <https://bugs.swift.org/browse/SR-648>
> 
> I've pulled and built swift from master on the main repo and am going through the steps to compile static lib (.a) files from the relevant _corelibs_ and then adding them to my tool-chain.
> 
> Once I can do this I'll try and add them to the build process.
> 
> I'm getting there wit libFoundation but have been having more difficulty with libDispatch.
> 
> Are there any docs or example projects I could look at for this?

I'm not sure that we have any better docs than the source, unfortunately.

If you have specific questions you can always try asking those in the bug or on the appropriate mailing lists.

 - Daniel

> 
> Thanks
> 
> Joel
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160905/0e736458/attachment.html>


More information about the swift-dev mailing list