[ModuleInterface] Pass clang module cache path to sub-instance.

This commit is contained in:
Graydon Hoare
2018-10-31 17:46:54 -07:00
parent 11f3c9470d
commit 8d6f6e2d2f

View File

@@ -122,6 +122,12 @@ ParseableInterfaceModuleLoader::configureSubInvocationAndOutputPaths(
SubInvocation.setRuntimeResourcePath(SearchPathOpts.RuntimeResourcePath);
SubInvocation.setTargetTriple(LangOpts.Target);
if (auto ClangLoader = Ctx.getClangModuleLoader()) {
auto const &Clang = ClangLoader->getClangInstance();
std::string ModuleCachePath = getModuleCachePathFromClang(Clang);
SubInvocation.setClangModuleCachePath(ModuleCachePath);
}
// Calculate an output filename that includes a hash of relevant key data, and
// wire up the SubInvocation's InputsAndOutputs to contain both input and
// output filenames.