[cfe-dev] Clang as a compiler-only tool

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Nov 27 10:26:32 PST 2012


> Yes, unfortunately the way plugins are currently implemented (given
> them access to all of the clang binary) is very expensive. This is
> even more noticeable when using LTO on ELF systems. If enabling
> plugins (linking with -export-dynamic), LTO cannot internalize much.

To put some numbers, I bootstrapped clang at 168705 in Release mode
(no asserts) on linux x86_64:

plain bootstrap:
  bin/clang is 32572488 bytes

bootstrap with CLANG_IS_PRODUCTION
  bin/clang is 30528584 bytes

bootstrap with LTO:
  bin/clang is 36843384 bytes!! (Looks like the inliner needs some lto logic)

bootstrap with LTO and CLANG_IS_PRODUCTION:
  bin/clang is 32055896 bytes.

I can benchmark startup if anyone has a suggestion on how to do it.

Cheers,
Rafael



More information about the cfe-dev mailing list