[PATCH] D104033: [clang][deps] Move enabling system header deps from `clang-scan-deps` to `DependencyScanning` library
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 10 07:34:33 PDT 2021
jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104033
Files:
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
clang/tools/clang-scan-deps/ClangScanDeps.cpp
Index: clang/tools/clang-scan-deps/ClangScanDeps.cpp
===================================================================
--- clang/tools/clang-scan-deps/ClangScanDeps.cpp
+++ clang/tools/clang-scan-deps/ClangScanDeps.cpp
@@ -504,8 +504,6 @@
AdjustedArgs.push_back("/clang:-o");
AdjustedArgs.push_back("/clang:" + LastO);
}
- AdjustedArgs.push_back("-Xclang");
- AdjustedArgs.push_back("-sys-header-deps");
if (!HasResourceDir) {
StringRef ResourceDir =
Index: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
===================================================================
--- clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
+++ clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
@@ -175,6 +175,7 @@
if (Opts->Targets.empty())
Opts->Targets = {deduceDepTarget(Compiler.getFrontendOpts().OutputFile,
Compiler.getFrontendOpts().Inputs)};
+ Opts->IncludeSystemHeaders = true;
switch (Format) {
case ScanningOutputFormat::Make:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104033.351170.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210610/26f626cc/attachment.bin>
More information about the cfe-commits
mailing list