[cfe-dev] compile_commands.json for Windows/MSVC
Chandler Carruth
chandlerc at google.com
Wed Aug 14 00:23:44 PDT 2013
On Tue, Aug 13, 2013 at 11:44 PM, Manuel Klimek <klimek at google.com> wrote:
> AFAIK nobody implemented json compile command output for Windows yet (back
> in the days when I implemented it, clang was so unusable on windows that
> nobody cared). So, currently, your approach with scrapping the compile
> commands from the visual studio make files seems a way to go.
>
As an alternative, you could add direct support to the tooling library for
querying Visual Studio for the commandline if there is a reasonable IPC
mechanism for doing that.
As another alternative, you could add a plugin to Visual Studio that caused
it to write out the json database whenever the project settings changed...
If there is a reasonable plugin layer to do that.
I would personally view both of these as strictly superior to teaching
CMake to do more things as they'll also work for non-CMake projects on
Windows. And if these aren't feasible, maybe some other solution that is
more generic.
I also think that whatever such system you could build, that integrates
cleanly on Windows, would be *very* welcome in the Clang repository, so
patches most definitely welcome there. (As in, I don't know how to do this,
but really really want it, so I'm crossing my fingers.)
> The next thing we'll need is to be able to translate cl.exe command line
> options to clang's. One way to do this is to use the ArgumentAdjuster to
> replace the cl.exe flags with the corresponding clang flags - again,
> somebody would need to implement this.
>
I don't think this is the right approach. We should just finish the Clang
driver's support that Reid and Hans have been working on. Honestly, it's
already pretty close.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130814/8614df40/attachment.html>
More information about the cfe-dev
mailing list