[cfe-dev] Precompiled headers with libclang
abhanshu1 at gmail.com
Wed Apr 4 02:01:16 PDT 2012
On Wed, Apr 4, 2012 at 1:58 PM, Chandler Carruth <chandlerc at google.com>wrote:
> On Wed, Apr 4, 2012 at 8:57 AM, Abhanshu Sharma <abhanshu1 at gmail.com>wrote:
>> I am exploring one more possibility. Is it possible for clang to just use
>> precompile header file (without corresponding source header files
>> available) to do its work?
> I could be wrong, but I would not expect this to work. I think lots of
> things still need to refer back to the underlying header files for printing
> out snippets in diagnostics, etc.
>> I don't want clang to check for any changes source headers file but
>> simply use precompile header file.
> Disabling the checks might be do-able -- but it's not clear to me why
> these are a problem?
I am trying to reduce every fraction of second possible. Since there are
very large of header files, I guess there would be some time getting wasted
in stat-ing those files. I want clang to assume everything else is constant
except source file.
>> If this is possible, I can create a single pch file for the source file
>> and can quickly move setup across machines. This would be similar to .jars
>> in java world.
> Ahh. I wonder if it would help to use digests rather than timestamps for
> these checks? Potentially as an optional mode?
> While computing digests is more expensive than checking timestamps, it is
> much less expensive than rebuilding a PCH image etc, so we could
> potentially enable this in general as a layered system:
> 1) if timestamp + inode etc differ, and
> 2) if sha1 digests differ, then rebuild
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev