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:
Alexis Laferrière
2024-02-12 11:09:18 -08:00
parent 8bb6846285
commit 86ea594f21
7 changed files with 108 additions and 12 deletions

View File

@@ -345,7 +345,7 @@ bool ImplicitModuleInterfaceBuilder::buildSwiftModuleInternal(
}
SubError = (bool)subASTDelegate.runInSubCompilerInstance(
moduleName, interfacePath, OutPath, diagnosticLoc,
moduleName, interfacePath, sdkPath, OutPath, diagnosticLoc,
silenceInterfaceDiagnostics,
[&](SubCompilerInstanceInfo &info) {
auto EBuilder = ExplicitModuleInterfaceBuilder(