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

Allan Sandfeld Jensen kde at carewolf.com
Mon Dec 18 21:13:42 CET 2017


On Montag, 18. Dezember 2017 20:55:42 CET René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > It doesn't, because the debug information is not loaded in the first
> > place.
> > When using readelf, note how the "A" flag is missing for those sections.
> 
> So it has to skip certain, possibly considerable parts of the file while
> loading it, rather than simply doing some efficient operation to copy the
> whole file into memory. That should affect load times somewhat, no?
> 
> > One more reason to use GCC. It only builds once, even under LTO, unless
> > you
> > specifically ask for the fat LTO objects.
> 
> Yet even with GCC the build times and memory requirements are larger with
> LTO than without. How can it not do certain things twice?
> 
It uses more memory because the compiler effectively works on all the source 
files at once during the linking phase, so it needs to hold all of files 
decoded in memory at the same time. It is not really much slower anymore 
though. It used to be slower because the final compilation was all in a single 
process and single threaded, but that part is now multithreaded. Now it is 
only slower if you dont have enough memory.

'Allan



More information about the Interest mailing list