[Qt-creator] Compiling Qt Creator in under 3 minutes

André Pönitz apoenitz at t-online.de
Wed May 21 21:10:02 CEST 2014


On Wed, May 21, 2014 at 12:36:42AM +0300, Jussi Pakkanen wrote:
> Issues noted
> 
> In theory unity builds should not require any code changes. In practice
> they almost always do. I ran into all sorts of issues and fixed them in the
> simplest possible way (sometimes just commenting out code or entire files).
> The unity builds thus do slightly less work, but I'd estimate it's around
> 1%. These are some of the things that broke:
> 
> - static variables/functions in two files with the same name (uncovered
> full copypasted functions)
> - namespace collisions caused by using statements
> - namespace clashes in code generated by uic, as it refers to its own stuff
> with namespace Ui instead of ::Ui
> 
> Hack/slashing all these issues took a few evenings. A proper fix would
> probably take several days. Some of the fixes (such as flushing out
> duplicate code) would be generally useful.

I am not sure I understood what the unity build does. Closest I can imagine
is that it concatenates some (or all?) translation units into one and tries
to compile the result. Of course that would not work with normal C++ projects
but would impose rather harsh restriction on naming conventions and code
structure, so this can't be what is meant as this interpretation conflicts
with the "in theory unity builds should not require any code changes".

Could you please shed some light on what it actually does?

Andre'




More information about the Qt-creator mailing list