[Interest] building Qt 5.9 on Linux - clang or GCC?

René J. V. Bertin rjvbertin at gmail.com
Mon Dec 18 16:32:39 CET 2017


Allan Sandfeld Jensen wrote:

Hi,

> It is pretty much the same. I would recommend gcc because that is default on
> Linux and the most likely to compile warning free and support most
> configurations.

That's more or less what I expected. The only mostly systematic difference I see 
(on all platforms) is that GCC generates debug information that takes much more 
space. No idea if that means there's more information but the difference is 
large enough that I wonder if it doesn't increase load times.

> Btw. LTO isn't that insane these days, In shared Qt builds we don't not let
...
> Especially if you want smaller binaries ltcg + optimize_size gives great
> results.

I know, but it still basically doubles the build time because almost everything 
is actually built a second time during the link step. A regular build already 
stresses my Linux system to a point where I can barely do anything else on it.
And on Mac, well, using LTO means you give up debugging, for some reason (the 
information is still there AFAICT, but the debugger acts as if it isn't). Not 
that I do a lot of Qt debugging, but it's useful to be able to trace application 
crashes into Qt code, and to be able to inspect QObjects, QWidgets etc.

R.




More information about the Interest mailing list