[cfe-dev] clang installation size

Roman Lebedev via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 12 06:42:12 PDT 2019


On Tue, Mar 12, 2019 at 4:40 PM Paulo Matos via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> Hi,
>
> I just cloned a llvm repo from github monolithic repo (release/8.x) and
> compiled with under ArchLinux with the following arguments:
> cmake -DCMAKE_INSTALL_PREFIX=/home/pmatos/installs/llvm-8x-head
> -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=ON -DLLVM_TARGETS_TO_BUILD=X86
> -DLLVM_ENABLE_PROJECTS=clang ../llvm-project/llvm
You did not specify the build type, therefore it defaulted to Debug,
which results in both ridiculously slow runtime,
and huge file sizes (due to the debug info).

> I make and make install. Then I am shocked by the resulting install tree
> size. That's 32Gb where bin is the largest folder with binaries as large
> as 1.8 Gb, with clang and clangd being the largest ones.
> -rwxr-xr-x 1 pmatos pmatos 1821621048 Mar 12 10:38 clang-8
> -rwxr-xr-x 1 pmatos pmatos 1493399376 Mar 12 10:35 clangd
>
> This is just ridiculously large. How can I reduce the size of these
> binaries and the overall tree? I am compiling this to use `scan-build`
> and `clang`, so is there a way to disable all the stuff I might not need?
>
> --
> Paulo Matos
Roman.

> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list