This is the mail archive of the
mailing list for the GCC project.
Re: Apple's implementation of precompiled headers
- To: neil at daikokuya dot demon dot co dot uk (Neil Booth)
- Subject: Re: Apple's implementation of precompiled headers
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Sun, 7 Oct 2001 22:13:38 +0100 (BST)
- Cc: dpatel at apple dot com (Devang Patel), degger at fhm dot edu (Daniel Egger), shebs at apple dot com (Stan Shebs), gcc at gcc dot gnu dot org
> IMO, an implementation of precompiled headers that is deemed worthy
> for inclusion must handle all the above, but I don't understand what
> you are referring to by file system location, unless you're talking
> about (sym)link games.
I think it is reasonable to assume that if the timestamp is unchanged,
so are the contents. And if you have inodes, use inode identity to
identify when you see the same files using different pathnames.
This would be in line with what make does, except that compiler options
and macro settings may be important.
Compiler options should be realtively simple: most don't affect the
preprocessed file (unless you consider rtl for decls etc as 'preprocessed'),
and the compiler knows which ones might have an effect. Some options
can only have an effect via predefines that they affect; so they don't
need special handling, it can be reduced to handling differences in the
set and value of defined macros.
The latter, of course, is more tricky. Do you save the entire state, or
a cryptographic fingerprint of it? Or do you note which macros are
possibly relevant for the header, and save only their state?