[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
Thu Jan 5 18:28:18 PST 2023
ChuanqiXu added a comment.
> IMO, this is not suitable; there must be *one* depfile for Ninja to work (otherwise build tools will need to manually collate all of this into one for ninja.
Yeah, but the producer of the compilation database is able to create a compilation db with the same `-MF` option. Do you mean you will feel much better that the clang-scan-deps will have a strong check?
>> 2. (The original way) Specify -MF in the command line of clang-scan-deps.
>
> I feel this scales and communicates what is happening much better because it actually is a flag for clang-scan-deps itself.
There is a related problem that how do we set the target of the dependency? In per file mode, we can easily specify it in the command line of clang-scan-deps. But we have to extract them ("-MT") from the command line with compilation database. (Otherwise all the targets have the same name, which is incorrect). Do you think it is acceptable?
> In what mode will clang output #include information without erroring about missing .pcm files for import statements? -E -fdirectives-only perhaps? This further exacerbates the need for "fake" command lines and costs on platforms with expensive process execution.
After we land D137526 <https://reviews.llvm.org/D137526>, we are able to do this by: `-M -MF <dep_file> -E`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139168/new/
https://reviews.llvm.org/D139168
More information about the cfe-commits
mailing list