[LLVMdev] Why are LLVM libraries enormous?

David Piepgrass dpiepgrass at mentoreng.com
Fri Jul 23 10:24:11 PDT 2010

I am considering using LLVM in a project for a Windows CE where space is at a premium. My jaw dropped when I checked the size of HowToUseJIT.exe (VC++ Win32 debug): 15.4 MB! The release build of HowToUseJIT is "only" 3.39 MB, but this is still 85% larger than the binary to which I was thinking of adding LLVM.

The top ten LLVM libraries (Win32 *.lib) are pretty huge:

Release Bld  Debug Bld   Name
24,510,490   71,038,240  LLVMCodeGen.lib
21,084,666   56,724,338  LLVMCore.lib
14,624,218   37,070,488  LLVMAnalysis.lib
11,987,202   30,711,450  LLVMScalarOpts.lib
 8,600,668   23,837,478  LLVMSelectionDAG.lib
 8,634,324   23,802,952  LLVMTransformUtils.lib
 8,347,134   20,840,744  LLVMipo.lib
 5,061,702   11,028,744  LLVMX86CodeGen.lib
 3,857,612    9,270,012  LLVMInstCombine.lib
 3,330,608    7,820,760  LLVMSupport.lib

The binaries are vastly larger than the source code; for example, everything in lib/CodeGen is 3.63 MB and everything in lib/VMCore is 907 KB. This is quite different than my typical experience; my own C++ source code is larger than the Release DLL it compiles into.

Does anyone know why this stuff is so big, and whether there is a way to get a bare subset of LLVM that fits in under 1 MB?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100723/9b8cb882/attachment.html>

More information about the llvm-dev mailing list