These are based on the target system, not the build or host system. Should we check the target instead?
Jordan On May 20, 2013, at 16:17 , Richard Smith <[email protected]> wrote: > Author: rsmith > Date: Mon May 20 18:17:08 2013 > New Revision: 182331 > > URL: http://llvm.org/viewvc/llvm-project?rev=182331&view=rev > Log: > Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ing > nonexistent Darwin-specific files on every module build. > > Modified: > cfe/trunk/lib/Frontend/CompilerInvocation.cpp > cfe/trunk/lib/Serialization/ASTWriter.cpp > > Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=182331&r1=182330&r2=182331&view=diff > ============================================================================== > --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original) > +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon May 20 18:17:08 2013 > @@ -1690,6 +1690,7 @@ std::string CompilerInvocation::getModul > hsOpts.UseStandardCXXIncludes, > hsOpts.UseLibcxx); > > +#ifdef __APPLE__ > // Darwin-specific hack: if we have a sysroot, use the contents and > // modification time of > // $sysroot/System/Library/CoreServices/SystemVersion.plist > @@ -1710,6 +1711,7 @@ std::string CompilerInvocation::getModul > code = hash_combine(code, statBuf.st_mtime); > } > } > +#endif > > return llvm::APInt(64, code).toString(36, /*Signed=*/false); > } > > Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=182331&r1=182330&r2=182331&view=diff > ============================================================================== > --- cfe/trunk/lib/Serialization/ASTWriter.cpp (original) > +++ cfe/trunk/lib/Serialization/ASTWriter.cpp Mon May 20 18:17:08 2013 > @@ -1279,11 +1279,13 @@ void ASTWriter::WriteInputFiles(SourceMa > SortedFiles.push_front(Entry); > } > > + FileManager &FileMgr = SourceMgr.getFileManager(); > + > +#ifdef __APPLE__ > // If we have an isysroot for a Darwin SDK, include its SDKSettings.plist in > // the set of (non-system) input files. This is simple heuristic for > // detecting whether the system headers may have changed, because it is too > // expensive to stat() all of the system headers. > - FileManager &FileMgr = SourceMgr.getFileManager(); > if (!HSOpts.Sysroot.empty() && !Chain) { > llvm::SmallString<128> SDKSettingsFileName(HSOpts.Sysroot); > llvm::sys::path::append(SDKSettingsFileName, "SDKSettings.plist"); > @@ -1292,6 +1294,7 @@ void ASTWriter::WriteInputFiles(SourceMa > SortedFiles.push_front(Entry); > } > } > +#endif > > unsigned UserFilesNum = 0; > // Write out all of the input files. > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
