[swift-dev] Building Static Binaries and Libs

Joel Hughes rudenoise at gmail.com
Mon Sep 5 06:13:18 CDT 2016


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

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?

Thanks

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


More information about the swift-dev mailing list