[Caching] Mark -typecheck action as caching supported

This is a regression causing lots of cached diagnostics tests not
functioning since the cached diagnostics processors are not initialized
for those tests which are supposed to test diagnostics caching.

The regression is caused by the fix that the typecheck module interface
job need to run a typecheck job in the sub-invocation. Now the typecheck
module interface job is correctly setup to avoid diagnostics about
unsupported file system error.
This commit is contained in:
Steven Wu
2024-05-10 14:28:37 -07:00
parent ab57ef9bbe
commit 431f097e7c
7 changed files with 34 additions and 17 deletions

View File

@@ -1765,6 +1765,8 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
if (casOpts.EnableCaching) {
genericSubInvocation.getCASOptions().EnableCaching = casOpts.EnableCaching;
genericSubInvocation.getCASOptions().CASOpts = casOpts.CASOpts;
genericSubInvocation.getCASOptions().HasImmutableFileSystem =
casOpts.HasImmutableFileSystem;
casOpts.enumerateCASConfigurationFlags(
[&](StringRef Arg) { GenericArgs.push_back(ArgSaver.save(Arg)); });
// ClangIncludeTree is default on when caching is enabled.