[Dependency Scanning] Add option to specify a separate Clang Dependency scanner module cache.

Clang dependency scanning produces scanner PCMs which we may want to live in a
different filesystem location than the main build module cache.

Resolves rdar://113222853
This commit is contained in:
Artem Chikin
2023-08-03 16:29:31 -07:00
parent f905b28a24
commit 8501f99cb2
6 changed files with 39 additions and 1 deletions

View File

@@ -1461,6 +1461,9 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
if (const Arg *A = Args.getLastArg(OPT_module_cache_path)) {
Opts.ModuleCachePath = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_clang_scanner_module_cache_path)) {
Opts.ClangScannerModuleCachePath = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_target_cpu))
Opts.TargetCPU = A->getValue();