mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Dependency Scanning] Discard and diagnose discovered binary modules built for an incompatible target
Previously the scanner accepted binary modules regardless of what triple they were built for
This commit is contained in:
@@ -427,8 +427,8 @@ ModuleFile::getModuleName(ASTContext &Ctx, StringRef modulePath,
|
||||
serialization::ValidationInfo loadInfo = ModuleFileSharedCore::load(
|
||||
"", "", std::move(newBuf), nullptr, nullptr,
|
||||
/*isFramework=*/isFramework, Ctx.SILOpts.EnableOSSAModules,
|
||||
Ctx.LangOpts.SDKName, Ctx.SearchPathOpts.DeserializedPathRecoverer,
|
||||
loadedModuleFile);
|
||||
Ctx.LangOpts.SDKName, Ctx.LangOpts.Target,
|
||||
Ctx.SearchPathOpts.DeserializedPathRecoverer, loadedModuleFile);
|
||||
Name = loadedModuleFile->Name.str();
|
||||
return std::move(moduleBuf.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user