mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
TBDGen: add a flag for embedding external symbols in emitted tbd file
Static-linked libraries could add symbols to the final tbd file. We need this flag to specify additional module names to collect symbols from. rdar://59399684
This commit is contained in:
@@ -1435,11 +1435,14 @@ static bool validateTBDIfNeeded(const CompilerInvocation &Invocation,
|
||||
}
|
||||
|
||||
const bool allSymbols = mode == FrontendOptions::TBDValidationMode::All;
|
||||
// We should ignore embeded symbols from external modules for validation.
|
||||
TBDGenOptions Opts = Invocation.getTBDGenOptions();
|
||||
Opts.embedSymbolsFromModules.clear();
|
||||
return MSF.is<SourceFile *>()
|
||||
? validateTBD(MSF.get<SourceFile *>(), IRModule,
|
||||
Invocation.getTBDGenOptions(), allSymbols)
|
||||
Opts, allSymbols)
|
||||
: validateTBD(MSF.get<ModuleDecl *>(), IRModule,
|
||||
Invocation.getTBDGenOptions(), allSymbols);
|
||||
Opts, allSymbols);
|
||||
}
|
||||
|
||||
static bool generateCode(const CompilerInvocation &Invocation,
|
||||
|
||||
Reference in New Issue
Block a user