[cfe-dev] PCH on Qt

Argyrios Kyrtzidis kyrtzidis at apple.com
Mon Oct 11 17:58:19 PDT 2010


Qt uses gcc's PCH directory, where various PCH files (for different languages) are all emitted in a common 'precompiled_header.gch' directory and if you do
"-include precompiled_header.h"
all PCH files are considered in alphabetical order and the first suitable one is used.

Do we want to support that ? It is complicated in our current architecture.

A simpler way would be, when adding support for clang compiler in Qt's build system, to inform Qt about clang's PCH way.
That would just need a '-include-pch' driver option so that Qt can just pass the PCH file that should be used (currently I "simulate" this using -Xclang -include-pch -Xclang filename).

Thoughts ?

-Argiris



More information about the cfe-dev mailing list