[cfe-dev] compilation database for tooling

Laszlo Nagy via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 5 03:27:33 PST 2016


hi Everyone,

i have a question about compilation database (CDB). i wrote tools which
generate CDB. it follows the format what is mentioned in the documentation
<http://clang.llvm.org/docs/JSONCompilationDatabase.html>. my question
related to the source file. a source file is mentioned two fields for a
single entry, the 'file' and the 'command' fields. i remember a discussion
earlier to make the source file to be relative to the directory (for
portability). but at the same time, i receive complains
<https://llvm.org/bugs/show_bug.cgi?id=24710> about my tool when it
generates non absolute paths (in the 'command' field).

to make it more fun, the 'directory' field could be also relative or
absolute (by the documentation). but two years ago, that was the first
thing i needed to fix (and always use absolute path).

can somebody tell me what is the current status of the file paths in CDB?
is there any test suite around the CDB reading in the Clang repo? or shall
i just blindly copy the CMake generated CDBs and ignore the documentation?

thanks,
Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160205/f6643a91/attachment.html>


More information about the cfe-dev mailing list