mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a -l flag to Swift and use it to provide autolinking information.
The spelling of the flag can certainly be changed; I just wanted to get something up and running. Swift SVN r7582
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "swift/AST/Diagnostics.h"
|
||||
#include "swift/AST/LinkLibrary.h"
|
||||
#include "swift/AST/Module.h"
|
||||
#include "swift/AST/ModuleLoader.h"
|
||||
#include "swift/AST/NameLookup.h"
|
||||
@@ -535,8 +536,9 @@ void Module::collectLinkLibraries(LinkLibraryCallback callback) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isa<TranslationUnit>(module)) {
|
||||
// FIXME: Should we include libraries specified by the user here?
|
||||
if (auto TU = dyn_cast<TranslationUnit>(module)) {
|
||||
for (auto lib : TU->getLinkLibraries())
|
||||
callback(lib);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user