mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialization: apply the SDK build version as part of the cache hash
The SDK build version is a decent heuristic for expected changes in the SDK. Any change in SDK, to clang headers in particular, can break references from cached swiftmodules. Track the SDK build version as part of the swiftmodule cache hash. This will ensure we rebuild from swiftinterfaces on SDK updates. rdar://122655978
This commit is contained in:
@@ -693,6 +693,7 @@ public:
|
||||
|
||||
std::error_code runInSubContext(StringRef moduleName,
|
||||
StringRef interfacePath,
|
||||
StringRef sdkPath,
|
||||
StringRef outputPath,
|
||||
SourceLoc diagLoc,
|
||||
llvm::function_ref<std::error_code(ASTContext&, ModuleDecl*,
|
||||
@@ -700,6 +701,7 @@ public:
|
||||
StringRef)> action) override;
|
||||
std::error_code runInSubCompilerInstance(StringRef moduleName,
|
||||
StringRef interfacePath,
|
||||
StringRef sdkPath,
|
||||
StringRef outputPath,
|
||||
SourceLoc diagLoc,
|
||||
bool silenceErrors,
|
||||
@@ -710,9 +712,10 @@ public:
|
||||
/// includes a hash of relevant key data.
|
||||
StringRef computeCachedOutputPath(StringRef moduleName,
|
||||
StringRef UseInterfacePath,
|
||||
StringRef sdkPath,
|
||||
llvm::SmallString<256> &OutPath,
|
||||
StringRef &CacheHash);
|
||||
std::string getCacheHash(StringRef useInterfacePath);
|
||||
std::string getCacheHash(StringRef useInterfacePath, StringRef sdkPath);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user