[LLVMdev] Why are LLVM libraries enormous?
dpiepgrass at mentoreng.com
Wed Jul 28 09:01:29 PDT 2010
> Why do you care about the size of library files?
I assumed dynamic libraries and static libraries were similar in size, but I just checked some of my own static libraries and they are indeed much larger than the executables they compile to. Sorry, it just never occurred to me that they would be much different.
> > Anyway, in the same example I mentioned that the size of HowToUseJIT
> > (an executable) is very large (15.4 MB debug, 3.4 MB release); as is
> > small example, I'd expect any real-world executable to be larger.
> Of course a real-world project would be larger, but not on a "linear"
> proportion compared to HowToUseJIT. That example application pulls a
> chunk from the LLVM libraries. That is what makes it large, not the
> in howtousejit.cpp. My compiler, for instance, is anything but a toy
> application and is 5.7 MB.
> > and whether it is possible to construct an example less than 1 MB.
> A LLVM JIT compiler for x86 under 1 MB? I doubt it is possible without
> a major rewriting of LLVM.
Even with no optimizations? Drat. That means I can't use it.
It's too bad nobody's written a utility to profile the sizes of C++ classes/functions... that would sure help an investigation like this. A question at StackOverflow didn't turn up any such utility:
More information about the llvm-dev