[patch] Reduce size of clang-format by 87% on OS X

Chandler Carruth chandlerc at google.com
Thu Dec 26 22:02:33 PST 2013


Can you verify that this doesn't turn on dead stripping for libclang.so (or
it does, but also uses an export list to keep the actual libclang interface
exported)? I can never remember whether the EXE flags are used for the
plugin-style DSOs, or the library flags.

Anyways, looks good. We should definitely get this wired up for Linux.

Have you checked the other binary size reductions? I wonder why we didn't
do this sooner.


On Fri, Dec 27, 2013 at 12:42 AM, Nico Weber <thakis at chromium.org> wrote:

> Now with the same change for cmake too.
>
>
> On Thu, Dec 26, 2013 at 8:50 PM, Nico Weber <thakis at chromium.org> wrote:
>
>> Hi,
>>
>> the attached patch turns on link-time dead code stripping for
>> clang-format, with the configure/make build. This reduces the size of
>> clang-format from 13MB to 1.6MB.
>>
>> Ok?
>>
>> Nico
>>
>> ps: The equivalent on linux is I think compiling with -ffunction-sections
>> -fdata-sections and linking with -Wl,-gc-sections, but I don't have access
>> to a linux box to try this at the moment.
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131227/d4491037/attachment.html>


More information about the cfe-commits mailing list