Ismail Badawi (ibadawi) via llvm-dev
2017-Aug-22 15:02 UTC
[llvm-dev] Question about built code size
I would guess that your 3.7.1 build is a release build and your 4.0.1 build is a debug build. Possibly related to https://reviews.llvm.org/rL285789 although I haven't verified this. You could explicitly pass -DCMAKE_BUILD_TYPE=RelWithDebInfo or -DCMAKE_BUILD_TYPE=Release to your cmake invocation. Hope this helps, Ismail On 2017-08-22, 9:52 AM, "llvm-dev on behalf of Lobron, David via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote: 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 _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev