[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

Ben Boeckel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 11:25:54 PST 2023


ben.boeckel added a comment.

In D139168#4025277 <https://reviews.llvm.org/D139168#4025277>, @ChuanqiXu wrote:

> Currently we will detect `-MF` in the command line and we will write the make-format dependency output to the corresponding file once we find `-MF`.

Which is fine, but docs need to mention that some clang-looking flags are actually for `clang-scan-deps` and that, as such, these flags cannot just be grabbed blindly from a compilation database. I'll note that I'm becoming more and more convinced that `compilation_database.json` is being abused for this as we are quite contorting it from its intended use case: listing the command lines to compile sources. Instead, we are using it as a source of *related* information that differs from the *real* command line in some important ways. Namely:

- dependency information extraction is re-used and therefore must be different from the *real* command
- module information must be missing from the scanning command line as it cannot be known at this point as scanning is used to discover those flags in the first place (usually a response file)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139168/new/

https://reviews.llvm.org/D139168



More information about the cfe-commits mailing list