<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">On Sat, Nov 17, 2012 at 10:43 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sat, Nov 17, 2012 at 1:34 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br>
> On Sat, Nov 17, 2012 at 11:06 PM, Laszlo Nagy<br>
> <<a href="mailto:rizsotto.mailinglist@gmail.com">rizsotto.mailinglist@gmail.com</a>> wrote:<br>
>> wrote a small program which might help to use the tools, which are using the<br>
>> tooling library. My understanding was that these tools need some compilation<br>
>> database. And one format is the JSON compilation database, which comes for<br>
>> free in a cmake project. Other projects could have difficulties to generate<br>
>> such file. And that's where a tool could help.<br>
>><br>
>> <a href="https://github.com/rizsotto/Bear" target="_blank">https://github.com/rizsotto/Bear</a><br>
>><br>
>> It runs the build command and intercept the 'exec' calls, filters the<br>
>> compiler invocations and generate the output file. (It is using LD_PRELOAD<br>
>> from GNU Libc, so it is not really portable.)<br>
>><br>
>> I know these kind of tools are out of scope here. But wanted to mention,<br>
>> because it could simplify to solve some cases. At least it did to me. ;)<br>
><br>
> This is very interesting and useful. Even more, something like this<br>
> could help Clang static analyzer to work with build systems that don't<br>
> respect CC and CXX environment variables.<br>
<br>
</div>I don't know what the current state of this is, but waaaay back when<br>
the tooling stuff was going in directly, there was a flag to Clang<br>
itself that would cause Clang to write out the compilation database<br></blockquote><div><br></div><div>You forgot the word "plan for" somewhere in that sentence? :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
just so that it could be used with any build system which could use<br>
the Clang compiler. The hope was that this would serve the needs of<br>
the static analyzer and other tools in interoperating with arbitrary<br>
build systems. Does that not work for some folks?<br>
<br>
(We are aware that not everyone is using Clang as their compiler, but<br>
honestly using Clang for tools but not for the compilation isn't going<br>
to work terribly well given that Clang can't transform code it can't<br>
parse....)<br>
<span class="HOEnZb"><font color="#888888"><br>
-Chandler<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>