[cfe-dev] Best practices

Domagoj Saric domagoj.saric at littleendian.com
Thu Sep 27 09:48:14 PDT 2012

On 23.9.2012. 16:21, Devchandra L Meetei wrote:
 > Hi clangers
 > is there any best practices which can be used to to reduce disk footprints of
 > executable and lib generated by clangs,
 > Usually binaries generated by clang is larger than those of gcc.

I can confirm that Clang's record WRT codegen size is quite far from good. The 
main problems I've identified are:
- excessive inlining (even with -Os)
- template bloat
- no support for fno-inline, -fno-inline-functions or -finline-limit

Here are some related tickets by me (you can find some tips how to "minimize 

By others:

These don't help either:

...from the date of the tickets and lack of response one can only deduce that 
this is of no or very low priority to Clang developers (or in "bitch mode": they 
only care about synthetic benchmarks and not about real world behaviour)... :/

"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman

More information about the cfe-dev mailing list