Every-time I run swift frontend the clang creates a new cachedir with
modulecache path hash(on every run the hash value is different for the same
input string) as the name of the dir and generates default cocoa framework
pcm files inside it.
I am using the swift front-end c++ api's to compile a simple swift file.
If I set the -fdisable-module-hash, then pcm files are generated without
the hash as required under the ModuleCache Dir.
so problem is solved as clang now see the existing pcm files, but now I hit
the next hurdle.
Now the pcm files are there in the cache, when I run the frontend again, I
assume clang will load the AST from the pcm files but clang *ReadAST *returns
with *ASTReader::OutOfDate *and as usual it calls *compileAndLoadModule *which
I want to avoid in the first place*.*
Call to *CLang*::*CompilerInstance*::*ModuleManager*->*ReadAST*
ImportLoc, ARRFlags) return with
as *ReadASTCore*(FileName, Type, ImportLoc, /*ImportedBy=*/nullptr,
Loaded, 0, 0, 0, ClientLoadCapabilities) returns with *OutOfDate.*
These files are generated just few minutes ago, how can it be OutOfDate I
don't have any idea.
File* modules.timestamp* under the ModuleCache Dir is 0 bytes.
On Fri, Apr 29, 2016 at 9:15 PM, Daniel Dunbar <email@example.com> wrote:
Clang will cache these automatically, can you give more details on exactly
what you are seeing?
> On Apr 28, 2016, at 10:50 PM, Ramakrishna Mallireddy via swift-users < > firstname.lastname@example.org> wrote:
> I have these precompiled module files generated every-time I run the
> How can I make the swift compiler to use these cache rather than
compiling the libraries again.
> swift-users mailing list