[swift-dev] Minimal clang to support swift?

William Dillon william at housedillon.com
Thu Nov 3 12:48:25 CDT 2016


HI all,

I'm working on a resource-constrained embedded system, and I'd like to reduce the size of my swift install as much as possible.  In deployment, I'll need to figure out what a non-compiling swift support install looks like, but that's not the question for today.  Currently, I'd like to have a functioning swift compiler on our hardware for rapid iteration, testing and debug.

So, my question is about the support that the swift compiler requires.  Based upon the instructions at swift.org, I know that I need at least Clang.  So, I followed the instructions at llvm.org and built it.  It seems to work, but it's 'uuge; around 700 MB with MinSizeRel and -Os.  Add Swift to it, and we're at about 1.1GB.  As a point of reference, I noticed that the Clang binary I built is 45Mb relative to the 13Mb clang in Debian.  

How much of llvm and clang do I really need to support Swift?

Is there any way built into llvm/clang's build system to strip the binaries, or otherwise make them smaller?

Thanks!
- Will

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


More information about the swift-dev mailing list