[clang][deps] Move enabling system header deps from `clang-scan-deps` to `DependencyScanning` library

This patch moves enabling system header deps from `clang-scan-deps` into the `DependencyScanning` library. This will make it easier to preserve semantics of the original TU command-line for modular dependencies (see D104036).

Reviewed By: arphaman

Differential Revision: https://reviews.llvm.org/D104033
This commit is contained in:
Jan Svoboda 2021-06-14 12:12:23 +02:00
parent cf7d970468
commit 6c6dcfc4ce
2 changed files with 1 additions and 2 deletions

View File

@ -177,6 +177,7 @@ public:
if (Opts->Targets.empty())
Opts->Targets = {deduceDepTarget(Compiler.getFrontendOpts().OutputFile,
Compiler.getFrontendOpts().Inputs)};
Opts->IncludeSystemHeaders = true;
switch (Format) {
case ScanningOutputFormat::Make:

View File

@ -502,8 +502,6 @@ int main(int argc, const char **argv) {
AdjustedArgs.push_back("/clang:-o");
AdjustedArgs.push_back("/clang:" + LastO);
}
AdjustedArgs.push_back("-Xclang");
AdjustedArgs.push_back("-sys-header-deps");
if (!HasResourceDir) {
StringRef ResourceDir =