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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to