This is the mail archive of the 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: Apple's implementation of precompiled headers

> 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?

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