DependenciesScanner: implement protocol for batch module dependencies scan

This scanning mode allows swift-driver to query module dependencies in a batch
and in a more granular way. In short term, it could help solve a problem that
clang module dependencies may vary if target triple changes. In a longer term,
we could break a holistic dependencies graph into smaller pieces for better caching
and reusing.

This change doesn't include the implementation of using the specified scanner
arguments to set up Clang dependencies scanner. It will come in later commits.
This commit is contained in:
Xi Ge
2020-08-20 11:45:21 -07:00
parent 5c4c4dcbcf
commit 29e655bac0
10 changed files with 225 additions and 13 deletions

View File

@@ -926,7 +926,8 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts,
}
if (const Arg *A = Args.getLastArg(OPT_placeholder_dependency_module_map))
Opts.PlaceholderDependencyModuleMap = A->getValue();
if (const Arg *A = Args.getLastArg(OPT_batch_scan_input_file))
Opts.BatchScanInputFilePath = A->getValue();
// Opts.RuntimeIncludePath is set by calls to
// setRuntimeIncludePath() or setMainExecutablePath().
// Opts.RuntimeImportPath is set by calls to