[PATCH] D66555: [driver] add a new option `-gen-cdb-fragment-path` to emit a fragment of a compilation database for each compilation
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 13:49:55 PDT 2019
arphaman created this revision.
arphaman added reviewers: Bigcheese, jkorous, dexonsmith.
Herald added a project: clang.
This patch adds a new option called `-gen-cdb-fragment-path` to the driver, which can be used to specify a directory path to which clang can emit a fragment of a CDB for each compilation it needs to invoke.
The CDB fragment is emitted into a unique file in the specified directory. It contains the `-cc1` clang invocation in its command. The file itself is actually a valid standalone CDB (if you disregard the not yet well supported `-cc1` innovation by the CDB, which I'll fix). To load the full CDB that can be emitted during a build, I'm going to add a new CDB reader from a directory that reads all fragments and aggregates them into one CDB in a follow-up patch.
This is useful to setup verification infrastructure for `clang-scan-deps` for some projects that don't have a way of constructing a CDB from their build.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66555
Files:
clang/include/clang/Driver/Driver.h
clang/include/clang/Driver/Job.h
clang/include/clang/Driver/Options.td
clang/lib/Driver/Compilation.cpp
clang/lib/Driver/Driver.cpp
clang/test/Driver/gen-cdb-fragment.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66555.216466.patch
Type: text/x-patch
Size: 6589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190821/f6c0aaca/attachment.bin>
More information about the cfe-commits
mailing list