[cfe-dev] CompilationDatabase support added to libclang and python binding
David Röthlisberger
david at rothlis.net
Thu Jul 5 23:46:37 PDT 2012
On 11 Jun 2012, at 09:32, Arnaud de Grandmaison wrote:
> I am done adding the CompilationDatabase functionality to libclang
> and the python binding
Hi Arnaud
Thanks for your work on this -- I see it has now made it onto trunk!
Looking at using it from python, I have a question:
The docstring for clang_CompileCommand_getArg in CXCompilationDatabase.h
says:
> Invariant :
> - argument 0 is the compiler executable
Whereas the python CompileCommand.arguments says:
> Invariants :
> - the first argument is the compiler executable
> - the last argument is the file being compiled
Is that last invariant actually true? If so, does it hold only for the
python, or also the C function? What happens for a command line
compiling and linking multiple source files at once: There would be
multiple entries in the compilation database (one per source file) so
will libclang re-order the command-line entry for each source file so
that the file in question comes last?
Thanks!
--Dave
More information about the cfe-dev
mailing list