[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Clang extra tools with compile_commands.json on windows
From:       Reid Kleckner <rnk () google ! com>
Date:       2015-01-30 18:06:30
Message-ID: CACs=tyLMeVh3irasjHuRME2rxtpq1GgWhzw9uX5zQAijKTzmJA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

> On Thu, Jan 29, 2015 at 10:33 PM, Reid Kleckner <rnk@google.com> wrote:
>
>> On Wed, Jan 28, 2015 at 10:25 AM, Manuel Klimek <klimek@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. =/

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 30, 2015 \
at 5:48 AM, Alexander Kornienko <span dir="ltr">&lt;<a \
href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div \
class="gmail_quote"><span class="">On Thu, Jan 29, 2015 at 10:33 PM, Reid Kleckner \
<span dir="ltr">&lt;<a href="mailto:rnk@google.com" \
target="_blank">rnk@google.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div \
class="gmail_quote"><span>On Wed, Jan 28, 2015 at 10:25 AM, Manuel Klimek <span \
dir="ltr">&lt;<a href="mailto:klimek@google.com" \
target="_blank">klimek@google.com</a>&gt;</span> wrote:<blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>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&#39;s \
certainly doable</div></div></div></blockquote><div><br></div></span><div>We \
don&#39;t need that. We can thread through --driver-mode=gcc/cl to get the desired \
behavior.</div><div><br></div><div>Here are some other potential pitfalls for making \
this code work:</div><div>1. The builtin argument adjusters won&#39;t work, clang-cl \
doesn&#39;t recognize -fsyntax-only or use -o for \
output</div></div></div></div></blockquote><div><br></div></span><div>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?</div></div></div></div></blockquote><div><br></div><div>There are arguments \
relevant to tooling with conflicting meanings, for example -MD, so I think that yes, \
we will have to know the mode.</div><div><br></div><div>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. =/</div></div></div></div>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic