[cfe-dev] clang installation size

Keane, Erich via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 12 06:43:18 PDT 2019


I don't see it in your list, so it appears that you're building debug mode.  Try adding the cmake flag:
-DCMAKE_BUILD_TYPE=Release

Alternatively, you can use MinSizeRel, which will sacrifice some performance for size.

-----Original Message-----
From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Paulo Matos via cfe-dev
Sent: Tuesday, March 12, 2019 6:40 AM
To: cfe-dev <cfe-dev at lists.llvm.org>
Subject: [cfe-dev] clang installation size

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

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
_______________________________________________
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