Yes, good point. I'll look into that.<br><br><div class="gmail_quote">On Mon, May 20, 2013 at 4:20 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These are based on the target system, not the build or host system. Should we check the target instead?<br>
<span class="HOEnZb"><font color="#888888"><br>
Jordan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On May 20, 2013, at 16:17 , Richard Smith <<a href="mailto:richard-llvm@metafoo.co.uk">richard-llvm@metafoo.co.uk</a>> wrote:<br>
<br>
> Author: rsmith<br>
> Date: Mon May 20 18:17:08 2013<br>
> New Revision: 182331<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=182331&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=182331&view=rev</a><br>
> Log:<br>
> Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ing<br>
> nonexistent Darwin-specific files on every module build.<br>
><br>
> Modified:<br>
>    cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>
>    cfe/trunk/lib/Serialization/ASTWriter.cpp<br>
><br>
> Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=182331&r1=182330&r2=182331&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=182331&r1=182330&r2=182331&view=diff</a><br>

> ==============================================================================<br>
> --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)<br>
> +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon May 20 18:17:08 2013<br>
> @@ -1690,6 +1690,7 @@ std::string CompilerInvocation::getModul<br>
>                       hsOpts.UseStandardCXXIncludes,<br>
>                       hsOpts.UseLibcxx);<br>
><br>
> +#ifdef __APPLE__<br>
>   // Darwin-specific hack: if we have a sysroot, use the contents and<br>
>   // modification time of<br>
>   //   $sysroot/System/Library/CoreServices/SystemVersion.plist<br>
> @@ -1710,6 +1711,7 @@ std::string CompilerInvocation::getModul<br>
>         code = hash_combine(code, statBuf.st_mtime);<br>
>     }<br>
>   }<br>
> +#endif<br>
><br>
>   return llvm::APInt(64, code).toString(36, /*Signed=*/false);<br>
> }<br>
><br>
> Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=182331&r1=182330&r2=182331&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=182331&r1=182330&r2=182331&view=diff</a><br>

> ==============================================================================<br>
> --- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)<br>
> +++ cfe/trunk/lib/Serialization/ASTWriter.cpp Mon May 20 18:17:08 2013<br>
> @@ -1279,11 +1279,13 @@ void ASTWriter::WriteInputFiles(SourceMa<br>
>       SortedFiles.push_front(Entry);<br>
>   }<br>
><br>
> +  FileManager &FileMgr = SourceMgr.getFileManager();<br>
> +<br>
> +#ifdef __APPLE__<br>
>   // If we have an isysroot for a Darwin SDK, include its SDKSettings.plist in<br>
>   // the set of (non-system) input files. This is simple heuristic for<br>
>   // detecting whether the system headers may have changed, because it is too<br>
>   // expensive to stat() all of the system headers.<br>
> -  FileManager &FileMgr = SourceMgr.getFileManager();<br>
>   if (!HSOpts.Sysroot.empty() && !Chain) {<br>
>     llvm::SmallString<128> SDKSettingsFileName(HSOpts.Sysroot);<br>
>     llvm::sys::path::append(SDKSettingsFileName, "SDKSettings.plist");<br>
> @@ -1292,6 +1294,7 @@ void ASTWriter::WriteInputFiles(SourceMa<br>
>       SortedFiles.push_front(Entry);<br>
>     }<br>
>   }<br>
> +#endif<br>
><br>
>   unsigned UserFilesNum = 0;<br>
>   // Write out all of the input files.<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
</div></div></blockquote></div><br>