This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PCH [Was: Re: Target FUNCTION_{PRO,EPI}LOGUE question]


Geoff Keating wrote:-

> OK, here's a high-level overview.

Thanks.

> The precompiled header mechanism works by:
> 
> - `compiling' a header ('foo.h'), as if it was a normal .c file
> - just before finishing the compilation, saving GCC's state
>   (including all interesting global variables, the contents of the .s
>   file so far, and lots of other stuff) to a file named foo.h.pch
> 
> - when a file is compiled, and cpplib looks for foo.h, if it also
>   finds foo.h.pch, and if this is (more or less) the first thing
>   in the compilation, it restores GCC's state to where it was before
> - and continues without including foo.h.

How do you handle conditional compilation that depends on earlier
macro definitions and / or command line switches?

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]