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

Chandler Carruth chandlerc at google.com
Fri Jul 19 00:33:37 PDT 2013


On Thu, Jul 18, 2013 at 2:20 PM, Sean Silva <silvas at purdue.edu> wrote:

> So I'm not completely opposed to the idea. I'd be curious what Chandler
>> thinks, he usually happens to have strong opinions about things like this :)
>>
>
> Yeah, I'd love to hear any ideas he has about this.
>

I'm summoned. =D

So, I'm moderately opposed to the idea. The reason is that we've tried this
(as Manuel mentions) and it creates a really huge new problem: where do you
look for the object file. Worse, the *right* object file.

The primary benefit of writing out to a single compilation database is
*precisely* that: it is a *single* compilation database. You can place it
in a common, predictable location and have clang-based tools look there. We
had huge, never-ending problems with this in practice. We would spend more
time looking for the .o file than we would running the clang tool, or we
would find the wrong .o file and end up not reproducing the compile
developers actually cared about.

Even if you build aggregate databases as you say for "final build
products", I agree with Manuel: this just moves the problem. Now you need
to know which build product to look into.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130719/56f9a557/attachment.html>


More information about the cfe-dev mailing list