<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 8, 2014 at 9:09 AM, Andrea Di Biagio <span dir="ltr"><<a href="mailto:andrea.dibiagio@gmail.com" target="_blank">andrea.dibiagio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Reid,<br>
<br>
thanks for the very useful feedback and sorry for the late reply...<br>
<div class=""><br>
On Tue, Apr 1, 2014 at 4:18 AM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
> Whoops, missed this over vacation.  My intention was to conditionalize this<br>
> on the driver mode, i.e. clang-cl or gcc-style, but that computation happens<br>
> further down, so I never got to this.<br>
><br>
> The big question is, which syntax does mingw gcc understand?  If it's the<br>
> libiberty style escaping, then the ifdef won't work, since clang could be<br>
> either mingw gcc or MSVC's cl depending on argv[0].<br>
<br>
</div>So, I just tried mingw (mingw32-gcc - gcc version 4.8.1) on a windows host.<br>
Unfortunately,  when expanding response files, mingw seems to<br>
understand a different syntax than MSVC's cl.<br></blockquote><div><br></div><div>That's what I expected.  We can't really parse command line flags until we've expanded response files, so we don't know if we're targeting mingw or not.  Our best approximation is the driver mode: clang-cl vs. gcc/g++.  Is this enough for your usage, or do you need to use the gcc frontend with Windows-style response files?</div>
<div><br></div><div>We could attempt to parse the command line before expanding response files to look for --target=.  Then we could use gnu tokenization only if the triple isOSCygMing().</div></div></div></div>