[Caching] Do not mix swift modules built from CAS vs. from FileSystem

Use a different context hash for modules built from caching using CAS
vs. normal swift modules. They should not be mixed since those cannot be
loaded as a dependencies for a module which is setup to build with a
different method.

rdar://122814823
This commit is contained in:
Steven Wu
2024-02-13 09:59:33 -08:00
parent 06d4d8cecf
commit 8fd0f73ff9
4 changed files with 37 additions and 2 deletions

View File

@@ -1922,6 +1922,10 @@ InterfaceSubContextDelegateImpl::getCacheHash(StringRef useInterfacePath,
// invalidation behavior of this cache item.
genericSubInvocation.getFrontendOptions().shouldTrackSystemDependencies(),
// Whether or not caching is enabled affects if the instance is able to
// correctly load the dependencies.
genericSubInvocation.getCASOptions().getModuleScanningHashComponents(),
// Whether or not OSSA modules are enabled.
//
// If OSSA modules are enabled, we use a separate namespace of modules to