[Interest] update on building Qt/Linux with clang?

Allan Sandfeld Jensen kde at carewolf.com
Mon Nov 5 20:53:05 CET 2018


On Montag, 5. November 2018 20:33:58 CET René J.V. Bertin wrote:
> On Monday November 05 2018 12:03:31 René J.V. Bertin wrote:
> >In my experience clang generates significantly more compact binaries
> 
> Quite: bzipped tarballs of everything except the examples, translations,
> QWE, QtWebView and Qt3D:
> 
> -rw-r--r-- 1 root root 363M Sep  8 13:22
> qt5-kde-devel-5.9.6.linux_3.x86_64.tbz2 (1003Mb uncompressed tarball)
> -rw-r--r-- 1 root root 199M Nov  5 19:22
> qt5-kde-devel-5.9.7.linux_3.x86_64.tbz2 (710Mb uncompressed tarball)
> 
> The first built with GCC 8, the 2nd with clang 6.0; identical compiler
> options (release build, -O3, force_debug_info for qtbase).
> 
Enable -lto/ltcg if you want smaller binaries, and -optimize-size if you don't 
mind losing a bit a performance for it.

Also enable -separate-debug-info. The executable results of the two compilers 
are very identical in size, or is mainly the debug-info that varies so much in 
size.

'Allan





More information about the Interest mailing list