[llvm-dev] Question about built code size

Lobron, David via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 22 06:52:38 PDT 2017


Hello llvm-dev,

I recently built the 4.0.1 codeline for the first time, after working with a 3.7.x version.  I used the same build environment and commands (gcc-4.8 on an Ubuntu GNU/Linux system).  The configure and build flags are:

configure:
-DLLVM_ENABLE_RTTI=1 -G "Unix Makefiles" 

build:
-static-libstdc++ -static-ligbcc -O2 -Wall

Despite keeping all of the above the same between releases, I found that the size of the binaries jumped by an order of magnitude.  In 3.7.x, the bin directory is 1.2G and lib is 1.6GB.  In 4.0.1, the bin directory is 21G, and lib is 15G.  Individual binaries are much larger, e.g.,

3.7.x:
total 1.2G
-rwxr-xr-x 1 dlobron staff 190M Feb 14  2017 clang-3.8
-rwxr-xr-x 1 dlobron staff 116M Feb 14  2017 clang-check

4.0.1:
total 21G
-rwxr-xr-x 1 dlobron staff  1.9G Aug 18 19:48 clang-6.0
-rwxr-xr-x 1 dlobron staff  1.6G Aug 18 20:41 clang-check

Does anyone know of a change in 4.0.1, such as to the default configure or build flags, that could have caused this, and how I might get back to the smaller sizes?  

Thank you,

David


More information about the llvm-dev mailing list