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

Roman Divacky rdivacky at freebsd.org
Wed Dec 12 06:51:24 PST 2012


The last iteration of the patch. I hope I addressed all the concerns.

Here are some numbers:

llvm/clang r169861

./configure --enable-optimized

clang size = 38268039

./configure --enable-optimized --enable-clang-arcmt=no

clang size = 36951527

./configure --enable-optimized --enable-clang-static-analyzer=no

clang size = 35998310

./configure --enable-optimized --enable-clang-arcmt=no --enable-clang-rewriter=no --enable-clang-static-analyzer=no

clang size = 34175606


So without all that we cut off ~4MB of ~36MB binary. Not bad.

Please review. Roman


On Tue, Dec 04, 2012 at 01:49:21PM -0500, Rafael Esp??ndola wrote:
> > Two patches attaches - one for clang that splits CLANG_IS_COMPILER_ONLY to
> > CLANG_DISABLE_REWRITER, CLANG_DISABLE_ARCMT and CLANG_DISABLE_STATIC_ANALYZER.
> >
> > And one for llvm that attempts to introduce --disable-clang-arcmt,
> > --disable-clang-rewriter and --disable-clang-static-analyzer to llvm
> > configure.
> >
> > I only need the clang part to be committed but I tried to provide
> > autoconf part too.
> 
> I think I agree with Douglas that positive flags would be better than
> negative ones. Can you change the patch to have, for example, a
> --enable-clang-rewriter that defaults to true? The way that
> AC_ARG_ENABLE works you should write just
> 
> AC_ARG_ENABLE(clang-rewriter, ...)
> 
> Remember to regenerate configure :-)
> 
> LGTM with those changes.
> 
> > Is it ok like this? Roman
> 
> Cheers,
> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-diet.patch
Type: text/x-diff
Size: 19447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121212/e7ea902b/attachment.patch>


More information about the cfe-dev mailing list