[cfe-dev] Clang extra tools with compile_commands.json on windows

Reid Kleckner rnk at google.com
Fri Jan 30 10:06:30 PST 2015


On Fri, Jan 30, 2015 at 5:48 AM, Alexander Kornienko <alexfh at google.com>
wrote:

> On Thu, Jan 29, 2015 at 10:33 PM, Reid Kleckner <rnk at google.com> wrote:
>
>> On Wed, Jan 28, 2015 at 10:25 AM, Manuel Klimek <klimek at google.com>
>> wrote:
>>>
>>> Well, libTooling does go through the clang::driver::Driver. The problem
>>> is that if we need the binary name to follow a certain pattern, the tool
>>> would need to know that... It's certainly doable
>>>
>>
>> We don't need that. We can thread through --driver-mode=gcc/cl to get the
>> desired behavior.
>>
>> Here are some other potential pitfalls for making this code work:
>> 1. The builtin argument adjusters won't work, clang-cl doesn't recognize
>> -fsyntax-only or use -o for output
>>
>
> Is it possible to have one universal syntax-only arguments adjuster (e.g.
> handle both -o and /o, etc.?) or do we need to recognize the clang-cl mode?
>

There are arguments relevant to tooling with conflicting meanings, for
example -MD, so I think that yes, we will have to know the mode.

One way to do this would be to write a translator from clang-cl driver
options to clang driver options. The clang-cl driver logic does *not* have
support for this, it actually translates to -cc1 options. So there would be
some duplicated logic. =/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150130/5a69e4b2/attachment.html>


More information about the cfe-dev mailing list