mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
Serialize library level into .swiftmodule binary format
Add a LIBRARY_LEVEL record to the .swiftmodule options block so the declared -library-level value survives across compilations. Without this, imported modules have to always fell back to a path heuristic that could only distinguish API vs SPI and never returned IPI. rdar://174255626
This commit is contained in:
@@ -997,6 +997,7 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
|
||||
M.setDeferredCodeGen();
|
||||
if (loadedModuleFile->isAggressiveCMOEnabled())
|
||||
M.setAggressiveCMOEnabled();
|
||||
M.setStoredLibraryLevel(loadedModuleFile->getLibraryLevel());
|
||||
if (loadedModuleFile->hasCxxInteroperability()) {
|
||||
M.setHasCxxInteroperability();
|
||||
M.setCXXStdlibKind(loadedModuleFile->getCXXStdlibKind());
|
||||
|
||||
Reference in New Issue
Block a user