Mon Sep 28 12:00:37 PDT 2015
it appears that Apple builds llvm/clang at -O2 rather than -Os.
>> > Here's something much more interesting though: I just discovered that =
llvm and clang 3.8 are both about TEN times smaller than they were in 3.6 a=
The difference is that the builds of llvm prior to 3.8 release was
done with the configure based build system. The configure based build
was deprecated out in favor of the cmake build starting with 3.8.
$ du -k /opt/local/libexec/llvm-3.7/lib
$ du -k /opt/local/libexec/llvm-3.8/lib
This bloat in the prior releases is due to the default usage of
--enable-debug-symbols in the configure build whereas the cmake build
defaults to the -debug variant.
>> > What's going on here??
>> My llvm-3.4 is 436MB, llvm-3.7 765MB.
> Are those the tarball sizes, or the unpacked sizes?
>> I don't know why mine are the size they are and yours are the size they =
> Differences due to OS version and thus the used compiler?
>> You could untar your llvm-3.7 and llvm-3.7 and compare them to see where=
the size difference lies.
> You did notice that I repackaged the images as xz'ed tarballs, right? Tha=
t does make a considerable difference for llvm and clang.
> According to xz, the llvm-3.7 tarball is 1628.6Mb uncompressed, llvm-3.6 =
1326Mb, llvm-3.8 107.3Mb . The llvm-3.8 destroot I just built (without shar=
ed libllvm and without RTTI support, using MacPorts clang 3.7 and -O3 -marc=
h=3Dnative) is 387Mb.
More information about the macports-dev