[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE 3.1.3 status



Chris Cheney writes:

> Great. 8) As I understand it 3.4 also will get the pch speedup. Do
> you know if this will help with the way Debian builds packages, or
> does it require special setup?

http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html#Precompiled%20Headers

The restrictions with current G++ PCH are:

"Only one precompiled header can be used in a particular compilation. 

A precompiled header can't be used once the first C token is seen. You
can have preprocessor directives before a precompiled header; you can
even include a precompiled header from inside another header, so long
as there are no C tokens before the #include. 

The precompiled header file must be produced for the same language as
the current compilation. You can't use a C precompiled header for a
C++ compilation. 

The precompiled header file must be produced by the same compiler
version and configuration as the current compilation is using. The
easiest way to guarantee this is to use the same compiler binary for
creating and using precompiled headers. 

Any macros defined before the precompiled header (including with -D)
must either be defined in the same way as when the precompiled header
was generated, or must not affect the precompiled header, which
usually means that the they don't appear in the precompiled header at
all. 

Certain command-line options must be defined in the same way as when
the precompiled header was generated. At present, it's not clear which
options are safe to change and which are not; the safest choice is to
use exactly the same options when generating and using the precompiled
header. "
"

I've heard on #kde-devel IRC ( so don't trust me on this ;) ) that KDE
will prolly create a header "kde-all-pch.h" or something like that,
which #includes all other KDE headers, and will have an option to make
the compile process use this header..

cheers
domi



Reply to: