[cfe-dev] [RFC] Embedding compilation database info in object files.

Manuel Klimek klimek at google.com
Fri Jul 19 05:43:33 PDT 2013


On Fri, Jul 19, 2013 at 2:22 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > I genuinely think that having a common database is far and away the best
> > strategy for integrating tools into a development process. We should
> focus
> > on updating build systems to directly write out these databases. That
> tends
> > to be the most effective way to get the compilation database.
>
> Changing the build system used by projects is hard, and changing some
> build systems is not possible.
>
> Would you be ok with a -fcompilation-db option that makes clang record
> the necessary information to that db? By the way, any ideas how to
> handle files that are compiled more than once? For example, when cross
> compiling every file in lib/Support is compiled for the build and host
> targets.
>

Add all of them. The interface in the CompilationDatabase is:

virtual std::vector<CompileCommand> getCompileCommands(
    StringRef FilePath) const = 0;


Cheers,/Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130719/b2b776b9/attachment.html>


More information about the cfe-dev mailing list