<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 1:58 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Wed, Apr 4, 2012 at 8:57 AM, Abhanshu Sharma <span dir="ltr"><<a href="mailto:abhanshu1@gmail.com" target="_blank">abhanshu1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Douglas, <div><br></div><div>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?</div></blockquote><div><br>

</div></div><div>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.</div><div class="im"><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I don't want clang to check for any changes source headers file but simply use precompile header file. </div></blockquote><div><br></div></div><div>Disabling the checks might be do-able -- but it's not clear to me why these are a problem?</div>
</div></blockquote><div>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. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>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.</div></blockquote><div><br></div></div><div>Ahh. I wonder if it would help to use digests rather than timestamps for these checks? Potentially as an optional mode?</div>

<div><br></div><div>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:</div>
<div>
<br></div><div>1) if timestamp + inode etc differ, and</div><div>2) if sha1 digests differ, then rebuild</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Warm Regards,<br>Abhanshu<br>