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:
Xi Ge
2020-02-11 22:27:43 -08:00
parent d5cb71a1af
commit e013f1fb81
8 changed files with 62 additions and 4 deletions

View File

@@ -1105,6 +1105,9 @@ static bool ParseTBDGenArgs(TBDGenOptions &Opts, ArgList &Args,
if (const Arg *A = Args.getLastArg(OPT_previous_module_installname_map_file)) {
Opts.ModuleInstallNameMapPath = A->getValue();
}
for (auto A : Args.getAllArgValues(OPT_embed_tbd_for_module)) {
Opts.embedSymbolsFromModules.push_back(StringRef(A).str());
}
return false;
}