[cfe-dev] Extending CMAKE_EXPORT_COMPILE_COMMANDS

Manuel Klimek klimek at google.com
Thu Jun 21 01:32:39 PDT 2012


On Thu, Jun 21, 2012 at 10:24 AM, Arnaud de Grandmaison <
arnaud.allarddegrandmaison at parrot.com> wrote:

>  On 06/21/2012 10:07 AM, Manuel Klimek wrote:
>
>  The reason why you might want a slightly diffferent file format is the
> key.
> For the compilation database, the usual question is "how do I parse this
> TU?". What would you key on for link commands? The output file?
>
>
>
> Hi Manuel,
>
> Even in your usual case --- "how do I parse this TU" --- the input file is
> not a discriminating key : this is why we get CompileCommands from the
> CompilationDatabase. At some point, you need to choose one
> CompilationCommand amongst several. I believe the real discriminating key
> is the ouput file (with the build system I know). Beside, this would enable
> other usages for the CompilationDatabase. It seems to me it is good to have
> the input file as a key, but this is not enough.
>

Well, when you want to analyze a file, you usually need the set of
parameters it can be parsed with, thus the current design of the file. For
linking, this doesn't seem to be necessary...

I especially wouldn't want to change the key in the current file format
 due to adding link commands. I'm currently slightly leaning towards an
extra file, because that leads to tools that only care about one part being
simpler (and once you add one use case, you start adding other use cases
;), but it's not a clear-cut decision.

Cheers,
/Manuel


>
> Cheers,
>
> --
> Arnaud de Grandmaison
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120621/43282fbe/attachment.html>


More information about the cfe-dev mailing list