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

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 8 18:37:23 PST 2023


ChuanqiXu added a comment.

> Hi, just wanted to say that i added support of these patch to XMake (i built a LLVM with your 4 patches) and it work pretty well :) (except for header units)

@Arthapz Great to hear that! It is pretty important for us to know there are more build systems which are using these functionality. BTW, for header units, it is still under discussion that how should build system and compiler interact about header units. It is still unclear whether or not the header units should be transparent to build systems (and other tools).

In D139168#4032866 <https://reviews.llvm.org/D139168#4032866>, @ben.boeckel wrote:

> In D139168#4030425 <https://reviews.llvm.org/D139168#4030425>, @ChuanqiXu wrote:
>
>> BTW, if you are interested, it should be possible to use clang-scan-deps to get the make-style format information.
>
> I want a *single* depfile for *anything* scanned by the `clang-scan-deps` invocation, not one per TU scanned. Also note that the `-MT` is the output of `clang-scan-deps`; in this case, the `.ddi` file that contains P1689 <https://reviews.llvm.org/P1689> content. I think it'd be *very* weird to have `clang-scan-deps -p1689-output=out.ddi -- clang -MF blah.d -MT out.ddi`.

I mean, it is possible to get the make-style format information by `clang-scan-deps -format=make --compilation-database=db.json`. (Although it sounds not smart indeed)

Then how do you feel about the current strategy? `clang-scan-deps --format=p1689 --compilation-database=db.json`. Then if every commands in db.json has the same `-MF` value, it should be able to satisfy your requirement.


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

https://reviews.llvm.org/D139168



More information about the cfe-commits mailing list