mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Hack in a -module-link-name option for autolinking.
In Swift, a module is expected to know which libraries it needs, rather than having this specified by an external module map. While we haven't quite designed this yet (frameworks get this for free in Clang, for example), we can at least provide a simple option for the common case of a module associated with a single library. This will probably change in the future, so I left in the more general deserialization code I was working on before simplifying the use case. A loaded module can in theory specify any arbitrary frameworks or libraries as dependencies, not just a single dylib. Swift SVN r7583
This commit is contained in:
@@ -301,3 +301,12 @@ SerializedModuleLoader::lookupClassMember(const Module *module,
|
||||
return;
|
||||
moduleFile->lookupClassMember(accessPath, name, decls);
|
||||
}
|
||||
|
||||
void
|
||||
SerializedModuleLoader::getLinkLibraries(const Module *module,
|
||||
Module::LinkLibraryCallback callback) {
|
||||
ModuleFile *moduleFile = cast<SerializedModule>(module)->File;
|
||||
if (!moduleFile)
|
||||
return;
|
||||
moduleFile->getLinkLibraries(callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user