[Caching] Use subInvocation to verify interface

The interface verification needs to read some command-line from the
interface file so it needs to be built inside sub-invocation.

rdar://122423965
This commit is contained in:
Steven Wu
2024-02-08 19:31:23 -08:00
parent 3986937e03
commit ebc90ffc0a
2 changed files with 3 additions and 5 deletions

View File

@@ -418,9 +418,7 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
// currently we need to ensure it still reads the flags written out
// in the .swiftinterface file itself. Instead, creation of that
// job should incorporate those flags.
if (FEOpts.ExplicitInterfaceBuild &&
!(FEOpts.isTypeCheckAction() &&
!Invocation.getCASOptions().EnableCaching))
if (FEOpts.ExplicitInterfaceBuild && !(FEOpts.isTypeCheckAction()))
return ModuleInterfaceLoader::buildExplicitSwiftModuleFromSwiftInterface(
Instance, Invocation.getClangModuleCachePath(),
FEOpts.BackupModuleInterfaceDir, PrebuiltCachePath, ABIPath, InputPath,