mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #71563 from xymus/sdk-version-in-hash
Serialization: Apply the SDK build version as part of the swiftmodule cache hash
This commit is contained in:
@@ -154,11 +154,13 @@ SwiftModuleScanner::scanInterfaceFile(Twine moduleInterfacePath,
|
||||
// name for the module, which includes an appropriate hash.
|
||||
auto newExt = file_types::getExtension(file_types::TY_SwiftModuleFile);
|
||||
auto realModuleName = Ctx.getRealModuleName(moduleName);
|
||||
StringRef sdkPath = Ctx.SearchPathOpts.getSDKPath();
|
||||
llvm::SmallString<32> modulePath = realModuleName.str();
|
||||
llvm::sys::path::replace_extension(modulePath, newExt);
|
||||
llvm::Optional<ModuleDependencyInfo> Result;
|
||||
std::error_code code = astDelegate.runInSubContext(
|
||||
realModuleName.str(), moduleInterfacePath.str(), StringRef(), SourceLoc(),
|
||||
realModuleName.str(), moduleInterfacePath.str(), sdkPath,
|
||||
StringRef(), SourceLoc(),
|
||||
[&](ASTContext &Ctx, ModuleDecl *mainMod, ArrayRef<StringRef> BaseArgs,
|
||||
ArrayRef<StringRef> PCMArgs, StringRef Hash) {
|
||||
assert(mainMod);
|
||||
|
||||
Reference in New Issue
Block a user