mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: preserve AutolinkForceLoad option when generating .swiftmodule from .swiftinterface
This change ensures using .swiftmodule built from source has the same behavior as using .swiftmodule built from .swiftinterface. A swift-ide-test utility is added to print linked libraries from a Swift module for testing purposes. rdar://58057556
This commit is contained in:
@@ -348,6 +348,8 @@ bool ModuleInterfaceBuilder::buildSwiftModule(
|
||||
std::string OutPathStr = OutPath;
|
||||
SerializationOpts.OutputPath = OutPathStr.c_str();
|
||||
SerializationOpts.ModuleLinkName = FEOpts.ModuleLinkName;
|
||||
SerializationOpts.AutolinkForceLoad =
|
||||
!subInvocation.getIRGenOptions().ForceLoadSymbolName.empty();
|
||||
|
||||
// Record any non-SDK module interface files for the debug info.
|
||||
StringRef SDKPath = SubInstance.getASTContext().SearchPathOpts.SDKPath;
|
||||
|
||||
Reference in New Issue
Block a user