TBDGen: teach the compiler to take a json file indicating previous install names

Using the new linker directives $ld$previous requires the compiler to know the previous
install names for the symbols marked as removed. This patch teaches the compiler
to take a path to a Json file specifying the map between module names and previous
install names. Also, these install names can be platform-specific.

Progress towards: rdar://58281536
This commit is contained in:
Xi Ge
2020-01-13 17:09:30 -08:00
parent 7928c58d33
commit 90f59e4336
9 changed files with 250 additions and 0 deletions

View File

@@ -1018,6 +1018,9 @@ static bool ParseTBDGenArgs(TBDGenOptions &Opts, ArgList &Args,
if (const Arg *A = Args.getLastArg(OPT_tbd_current_version)) {
Opts.CurrentVersion = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_previous_module_installname_map_file)) {
Opts.ModuleInstallNameMapPath = A->getValue();
}
return false;
}