<div class="gmail_quote">On Thu, May 24, 2012 at 4:11 PM, Arnaud de Grandmaison <span dir="ltr"><<a href="mailto:arnaud.allarddegrandmaison@parrot.com" target="_blank">arnaud.allarddegrandmaison@parrot.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 05/24/2012 02:28 PM, Manuel Klimek wrote:<br>
> In the end it depends on who's willing to write which solution and<br>
> propose a patch to clang ;)<br>
</div>Do not tempt me ;)<br>
<br>
The use case I have here is that several people are using clang_complete<br>
+ vim, but have to use gcc because their target requires it. We have<br>
added a cmake target to generate the ".clang_complete" configuration<br>
file, which provides the options necessary for compiling the source<br>
files : in essence, that's a compilation-db. On its side,<br>
clang_complete also provides a script to extract the compilation options<br>
from the build system.<br>
<br>
I am interested in working on this compilationdb, as this will clearly<br>
be a benefit for clang and all derivative projects.</blockquote><div><br></div><div>So, there are multiple things to the CompilationDatabase where work is needed:</div><div><br></div><div>1. Add ways to create the JSON compilation-db. We already have a way to create it from CMake, there were discussions on getting it out of ninja, and even creating one yourself with a python script is not too hard. </div>
<div><br></div><div>2. Integrating the compilation database into libclang, as tools like clang-complete are libclang based, which currently doesn't expose the CompilationDatabase interfaces; adding a C interface around CompilationDatabase would help there.</div>
<div><br></div><div>3. Making CompilationDatabase work in more use cases:</div><div>- add code to deal with gcc specific flags, where people have gcc as their main tool; don't know whether it makes sense to add code to deal with other compilers</div>
<div>- add other formats for the CompilationDatabase, for example for Ninja it might be viable to basically link in a Ninja runtime (if available at clang compile time) to directly read the compile commands from the ninja files</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div><br></div></div>