mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Add basics of module serialization, importing and validation in embedded Swift.
- Add a flag to the serialized module (IsEmbeddedSwiftModule) - Check on import that the mode matches (don't allow importing non-embedded module in embedded mode and vice versa) - Drop TBD support, it's not expected to work in embedded Swift for now - Drop auto-linking backdeploy libraries, it's not expected to backdeploy embedded Swift for now - Drop prespecializations, not expected to work in embedded Swift for now - Use CMO to serialize everything when emitting an embedded Swift module - Change SILLinker to deserialize/import everything when importing an embedded Swift module - Add an IR test for importing modules - Add a deserialization validation test
This commit is contained in:
@@ -158,6 +158,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
|
||||
case options_block::HAS_HERMETIC_SEAL_AT_LINK:
|
||||
extendedInfo.setHasHermeticSealAtLink(true);
|
||||
break;
|
||||
case options_block::IS_EMBEDDED_SWIFT_MODULE:
|
||||
extendedInfo.setIsEmbeddedSwiftModule(true);
|
||||
break;
|
||||
case options_block::IS_TESTABLE:
|
||||
extendedInfo.setIsTestable(true);
|
||||
break;
|
||||
@@ -1405,6 +1408,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
|
||||
Bits.IsSIB = extInfo.isSIB();
|
||||
Bits.IsStaticLibrary = extInfo.isStaticLibrary();
|
||||
Bits.HasHermeticSealAtLink = extInfo.hasHermeticSealAtLink();
|
||||
Bits.IsEmbeddedSwiftModule = extInfo.isEmbeddedSwiftModule();
|
||||
Bits.IsTestable = extInfo.isTestable();
|
||||
Bits.ResilienceStrategy = unsigned(extInfo.getResilienceStrategy());
|
||||
Bits.IsImplicitDynamicEnabled = extInfo.isImplicitDynamicEnabled();
|
||||
|
||||
Reference in New Issue
Block a user