mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag (#39516)
* Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag This includes a bit in the module format to represent if the module was compiled with -enable-ossa-modules flag. When compiling a client module with -enable-ossa-modules flag, all dependent modules are checked for this bit, if not on, recompilation is triggered with -enable-ossa-modules. * Updated tests
This commit is contained in:
@@ -349,12 +349,10 @@ ModuleFile::getModuleName(ASTContext &Ctx, StringRef modulePath,
|
||||
/*RequiresNullTerminator=*/false);
|
||||
std::shared_ptr<const ModuleFileSharedCore> loadedModuleFile;
|
||||
bool isFramework = false;
|
||||
serialization::ValidationInfo loadInfo =
|
||||
ModuleFileSharedCore::load(modulePath.str(),
|
||||
std::move(newBuf),
|
||||
nullptr,
|
||||
nullptr,
|
||||
/*isFramework*/isFramework, loadedModuleFile);
|
||||
serialization::ValidationInfo loadInfo = ModuleFileSharedCore::load(
|
||||
modulePath.str(), std::move(newBuf), nullptr, nullptr,
|
||||
/*isFramework*/ isFramework, Ctx.SILOpts.EnableOSSAModules,
|
||||
loadedModuleFile);
|
||||
Name = loadedModuleFile->Name.str();
|
||||
return std::move(moduleBuf.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user