[swift-dev] Minimal clang to support swift?
Karl
razielim at gmail.com
Mon Nov 7 06:30:42 CST 2016
> On 3 Nov 2016, at 18:48, William Dillon via swift-dev <swift-dev at swift.org> wrote:
>
> 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 <http://swift.org/>, I know that I need at least Clang. So, I followed the instructions at llvm.org <http://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
>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org <mailto:swift-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
The swift compiler delegates to clang for linking executables on non-Darwin platforms.
I believe that’s the only reason we need it - other things from libclang, such as stuff for the importer, seem to get statically-linked.
- Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20161107/34b8d4f9/attachment.html>
More information about the swift-dev
mailing list