[cfe-dev] clang tool rejects compilation arguments from compilation database (incorrectly?)
Péter Ésik
peter.esik at gmail.com
Fri Oct 24 12:38:00 PDT 2014
2014-10-24 18:36 GMT+02:00 Manuel Klimek <klimek at google.com>:
>
> To get a compilation database from a project:
> https://github.com/rizsotto/Bear
> might help.
I did try bear some time back, but it did not work. Or to be more accurate,
it worked "some". For some files, the compilation failed with an error i
can't recall right now, and for the cpp files that did compile correctly,
the result compile_command.json was corrupt (by the looks of it, it was a
race condition, overlapping lines, weird NULL characters at the end of the
file).
On Fri Oct 24 2014 at 9:11:54 AM Reid Kleckner <rnk at google.com> wrote:
>
> The tooling infrastructure expects your compilation database to
> contain flags for the main gcc-style frontend, not the -cc1 subprocess
> invocation. So -### won't help you here.
Not really relevant for me, but is this because for a clang tool to work
properly, the gcc interface is always sufficient? (include paths, etc.)
> I believe we have some flag that prints the full clang command line
> during the compile, but I've forgotten what it is.
That would be extremely useful for me, does anyone remember it? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141024/8aefd140/attachment.html>
More information about the cfe-dev
mailing list