[llvm-dev] Size of produced binaries when compiling llvm & clang sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Size of produced binaries when compiling llvm & clang sources

Adam Nemet via llvm-dev
Dear llvm developpers,
I followed the tutorial to build llvm and clang provided here:
The sources are in sync with subversion repository, and I ended up with more than 30GB of binaries in llvm/bin as shown at the end of this message.

I assume I did something wrong, but I did not find any entry in the doc that helps me understand how to reduce the size of the binaries produced.

Is this normal ? Does any one has some hint to prevent this ?

Here are the sizes of the binaries:

1.9G clang-7
 1.6G clang-check
 1.2G clang-tidy
 1.1G opt
 1.1G bugpoint
 1.1G llvm-lto
 1.1G llvm-lto2
1018M llc
1015M c-index-test
 992M dsymutil
 992M llvm-isel-fuzzer
 989M llvm-opt-fuzzer
 987M llvm-dwp
 937M llvm-c-test
 653M clang-import-test
 512M clangd
 493M arcmt-test
 484M lli
 480M clang-query
 473M clang-refactor
 469M clang-move
 468M global-symbol-builder
 467M clang-change-namespace
 464M tool-template
 464M clang-rename
 462M clang-reorder-fields
 460M find-all-symbols
 456M clang-doc
 452M clang-include-fixer
 444M modularize
 443M clang-func-mapping
 442M clang-diff
 441M libToolingExample00
 438M pp-trace
 434M diagtool
 184M llvm-cfi-verify
 170M llvm-objdump
 168M sancov
 158M llvm-rtdyld
 149M llvm-ar
 148M llvm-nm
 145M llvm-extract
 145M llvm-link
 142M llvm-dwarfdump
 141M llvm-split
 131M llvm-mc
 127M llvm-pdbutil
 126M clang-offload-bundler
 122M llvm-mca
 121M verify-uselistorder
 121M llvm-cat
 120M llvm-as
 117M llvm-special-case-list-fuzzer
 117M llvm-demangle-fuzzer
 116M llvm-modextract
 114M obj2yaml
 112M llvm-xray
 105M sanstats
 105M llvm-symbolizer
  96M llvm-readobj
  93M llvm-cov
  90M lli-child-target
  86M llvm-cxxdump
  85M llvm-objcopy
  83M llvm-cvtres
  82M llvm-size
  76M clang-apply-replacements
  75M clang-format
  64M llvm-diff
  59M llvm-dis
  53M llvm-stress
  50M llvm-tblgen
  48M llvm-profdata
  31M yaml2obj
  17M clang-tblgen


- regards,

Manuel

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Size of produced binaries when compiling llvm & clang sources

Adam Nemet via llvm-dev
On Fri, Apr 27, 2018 at 6:21 PM, Manuel Yguel via llvm-dev
<[hidden email]> wrote:
> Dear llvm developpers,
> I followed the tutorial to build llvm and clang provided here:
> https://clang.llvm.org/get_started.html
>
> The sources are in sync with subversion repository, and I ended up with more
> than 30GB of binaries in llvm/bin as shown at the end of this message.
You probably built the debug version, with debug info.
If you do not want that, you could either specify `-DCMAKE_BUILD_TYPE=Release`,
or modify/pass `CFLAGS`/`CXXFLAGS` so that no debuginfo is generated.

> I assume I did something wrong, but I did not find any entry in the doc that
> helps me understand how to reduce the size of the binaries produced.
>
> Is this normal ? Does any one has some hint to prevent this ?
>
> Here are the sizes of the binaries:
>
> 1.9G clang-7
>  1.6G clang-check
>  1.2G clang-tidy
>  1.1G opt
>  1.1G bugpoint
>  1.1G llvm-lto
>  1.1G llvm-lto2
> 1018M llc
> 1015M c-index-test
>  992M dsymutil
>  992M llvm-isel-fuzzer
>  989M llvm-opt-fuzzer
>  987M llvm-dwp
>  937M llvm-c-test
>  653M clang-import-test
>  512M clangd
>  493M arcmt-test
>  484M lli
>  480M clang-query
>  473M clang-refactor
>  469M clang-move
>  468M global-symbol-builder
>  467M clang-change-namespace
>  464M tool-template
>  464M clang-rename
>  462M clang-reorder-fields
>  460M find-all-symbols
>  456M clang-doc
>  452M clang-include-fixer
>  444M modularize
>  443M clang-func-mapping
>  442M clang-diff
>  441M libToolingExample00
>  438M pp-trace
>  434M diagtool
>  184M llvm-cfi-verify
>  170M llvm-objdump
>  168M sancov
>  158M llvm-rtdyld
>  149M llvm-ar
>  148M llvm-nm
>  145M llvm-extract
>  145M llvm-link
>  142M llvm-dwarfdump
>  141M llvm-split
>  131M llvm-mc
>  127M llvm-pdbutil
>  126M clang-offload-bundler
>  122M llvm-mca
>  121M verify-uselistorder
>  121M llvm-cat
>  120M llvm-as
>  117M llvm-special-case-list-fuzzer
>  117M llvm-demangle-fuzzer
>  116M llvm-modextract
>  114M obj2yaml
>  112M llvm-xray
>  105M sanstats
>  105M llvm-symbolizer
>   96M llvm-readobj
>   93M llvm-cov
>   90M lli-child-target
>   86M llvm-cxxdump
>   85M llvm-objcopy
>   83M llvm-cvtres
>   82M llvm-size
>   76M clang-apply-replacements
>   75M clang-format
>   64M llvm-diff
>   59M llvm-dis
>   53M llvm-stress
>   50M llvm-tblgen
>   48M llvm-profdata
>   31M yaml2obj
>   17M clang-tblgen
>
>
> - regards,
>
> Manuel
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Size of produced binaries when compiling llvm & clang sources

Adam Nemet via llvm-dev
On 2018-04-27 16:00, Roman Lebedev via llvm-dev wrote:

> On Fri, Apr 27, 2018 at 6:21 PM, Manuel Yguel via llvm-dev
> <[hidden email]> wrote:
>> Dear llvm developpers,
>> I followed the tutorial to build llvm and clang provided here:
>> https://clang.llvm.org/get_started.html
>>
>> The sources are in sync with subversion repository, and I ended up
>> with more
>> than 30GB of binaries in llvm/bin as shown at the end of this message.
> You probably built the debug version, with debug info.
> If you do not want that, you could either specify
> `-DCMAKE_BUILD_TYPE=Release`,
> or modify/pass `CFLAGS`/`CXXFLAGS` so that no debuginfo is generated.

Better yet, build with -DLLVM_USE_SPLIT_DWARF=ON
-DLLVM_BUILD_LLVM_DYLIB=ON.

--
whitequark
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Size of produced binaries when compiling llvm & clang sources

Adam Nemet via llvm-dev
In reply to this post by Adam Nemet via llvm-dev
Thanks a lot Roman,
It worked, it reduces the size of the binaries by 30.
It took me a bit of time to get back because I updated the code to the last version and it stopped compiling due to an error and I only compile llvm/clang at night.

- all the best,


--------------

On Fri, Apr 27, 2018 at 6:00 PM, Roman Lebedev <[hidden email]> wrote:
On Fri, Apr 27, 2018 at 6:21 PM, Manuel Yguel via llvm-dev
<[hidden email]> wrote:
> Dear llvm developpers,
> I followed the tutorial to build llvm and clang provided here:
> https://clang.llvm.org/get_started.html
>
> The sources are in sync with subversion repository, and I ended up with more
> than 30GB of binaries in llvm/bin as shown at the end of this message.
You probably built the debug version, with debug info.
If you do not want that, you could either specify `-DCMAKE_BUILD_TYPE=Release`,
or modify/pass `CFLAGS`/`CXXFLAGS` so that no debuginfo is generated.

> I assume I did something wrong, but I did not find any entry in the doc that
> helps me understand how to reduce the size of the binaries produced.
>
> Is this normal ? Does any one has some hint to prevent this ?
>
> Here are the sizes of the binaries:
>
> 1.9G clang-7
>  1.6G clang-check
>  1.2G clang-tidy
>  1.1G opt
>  1.1G bugpoint
>  1.1G llvm-lto
>  1.1G llvm-lto2
> 1018M llc
> 1015M c-index-test
>  992M dsymutil
>  992M llvm-isel-fuzzer
>  989M llvm-opt-fuzzer
>  987M llvm-dwp
>  937M llvm-c-test
>  653M clang-import-test
>  512M clangd
>  493M arcmt-test
>  484M lli
>  480M clang-query
>  473M clang-refactor
>  469M clang-move
>  468M global-symbol-builder
>  467M clang-change-namespace
>  464M tool-template
>  464M clang-rename
>  462M clang-reorder-fields
>  460M find-all-symbols
>  456M clang-doc
>  452M clang-include-fixer
>  444M modularize
>  443M clang-func-mapping
>  442M clang-diff
>  441M libToolingExample00
>  438M pp-trace
>  434M diagtool
>  184M llvm-cfi-verify
>  170M llvm-objdump
>  168M sancov
>  158M llvm-rtdyld
>  149M llvm-ar
>  148M llvm-nm
>  145M llvm-extract
>  145M llvm-link
>  142M llvm-dwarfdump
>  141M llvm-split
>  131M llvm-mc
>  127M llvm-pdbutil
>  126M clang-offload-bundler
>  122M llvm-mca
>  121M verify-uselistorder
>  121M llvm-cat
>  120M llvm-as
>  117M llvm-special-case-list-fuzzer
>  117M llvm-demangle-fuzzer
>  116M llvm-modextract
>  114M obj2yaml
>  112M llvm-xray
>  105M sanstats
>  105M llvm-symbolizer
>   96M llvm-readobj
>   93M llvm-cov
>   90M lli-child-target
>   86M llvm-cxxdump
>   85M llvm-objcopy
>   83M llvm-cvtres
>   82M llvm-size
>   76M clang-apply-replacements
>   75M clang-format
>   64M llvm-diff
>   59M llvm-dis
>   53M llvm-stress
>   50M llvm-tblgen
>   48M llvm-profdata
>   31M yaml2obj
>   17M clang-tblgen
>
>
> - regards,
>
> Manuel
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev