[build2] Is clang compilation database supported?

Boris Kolpackov boris at codesynthesis.com
Wed Nov 15 13:01:28 UTC 2017


Guillaume Racicot <gufideg at gmail.com> writes:

> I wondered if outputting clang compilation database json file is supported
> or planned to be supported. A lot of tools I use rely on it, including my
> IDE. Not supporting it would be a huge barrier for our team.

It is not yet supported though it is pretty high on our TODO list. If you
are interested in helping to flesh this feature out and then trying it on
your project, we can move it to the top of the list.

The Clang compilation database and VC's Open Folder functionality appear
to be examples of a more general concept of producing some form of build
description or project description (Open Folder includes both). So we
want to make sure we get it right.

Specific to the Clang compilation database, the questions are:

1. At what level should we write it? Project? Amalgamation? Somewhere
   else for everything being built in this invocation?

2. How do we do incremental updates? Reportedly, for larger projects,
   completely regenerating the database can take a non-trivial amount
   of time.

3. Will it be acceptable if the only way to update the database is to
   also update the project? It will be the most natural approach since
   the only time we assemble the complete command lines is when we are
   about to update the target. However, it is not clear whether this
   will be too limiting.

Boris



More information about the users mailing list