mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #71586 from cachemeifyoucan/eng/PR-122814823
[Caching] Do not mix swift modules built from CAS vs. from FileSystem
This commit is contained in:
@@ -71,7 +71,8 @@ std::string CompilerInvocation::getPCHHash() const {
|
||||
SearchPathOpts.getPCHHashComponents(),
|
||||
DiagnosticOpts.getPCHHashComponents(),
|
||||
SILOpts.getPCHHashComponents(),
|
||||
IRGenOpts.getPCHHashComponents());
|
||||
IRGenOpts.getPCHHashComponents(),
|
||||
CASOpts.getPCHHashComponents());
|
||||
|
||||
return llvm::toString(llvm::APInt(64, Code), 36, /*Signed=*/false);
|
||||
}
|
||||
@@ -85,7 +86,8 @@ std::string CompilerInvocation::getModuleScanningHash() const {
|
||||
SearchPathOpts.getModuleScanningHashComponents(),
|
||||
DiagnosticOpts.getModuleScanningHashComponents(),
|
||||
SILOpts.getModuleScanningHashComponents(),
|
||||
IRGenOpts.getModuleScanningHashComponents());
|
||||
IRGenOpts.getModuleScanningHashComponents(),
|
||||
CASOpts.getModuleScanningHashComponents());
|
||||
|
||||
return llvm::toString(llvm::APInt(64, Code), 36, /*Signed=*/false);
|
||||
}
|
||||
|
||||
@@ -1932,6 +1932,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
|
||||
|
||||
Reference in New Issue
Block a user