<div dir="ltr">Whoops, missed this over vacation.  My intention was to conditionalize this on the driver mode, i.e. clang-cl or gcc-style, but that computation happens further down, so I never got to this.<div><br></div><div>
The big question is, which syntax does mingw gcc understand?  If it's the libiberty style escaping, then the ifdef won't work, since clang could be either mingw gcc or MSVC's cl depending on argv[0].</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 6:54 PM, 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">ping.<br>
<br>
Any feedback would be appreciated.<br>
Thanks!<br>
<br>
On Thu, Mar 20, 2014 at 3:04 PM, Andrea Di Biagio<br>
<div><div class="h5"><<a href="mailto:andrea.dibiagio@gmail.com">andrea.dibiagio@gmail.com</a>> wrote:<br>
> ping.<br>
><br>
> On Fri, Mar 14, 2014 at 11:14 AM, Andrea Di Biagio<br>
> <<a href="mailto:andrea.dibiagio@gmail.com">andrea.dibiagio@gmail.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> This patch teaches the driver how to use function<br>
>> 'llvm::cl::TokenizeWindowsCommandLine' to correctly parse response<br>
>> files on Windows.<br>
>><br>
>> Microsoft defines specific rules for parsing c/c++ command-line<br>
>> arguments here: <a href="http://msdn.microsoft.com/en-us/library/17w5ykft.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/17w5ykft.aspx</a><br>
>> .<br>
>> Those rules are currently implemented by function<br>
>> TokenizeWindowsCommandLine in llvm "lib/Support/CommandLine.cpp".<br>
>><br>
>> However, the clang driver doesn't call that method when the host is<br>
>> WIN32. Instead, we always call function<br>
>> llvm::cl::TokenizeGNUCommandLine.<br>
>><br>
>> This is problematic, for example, when we have backslashes in a<br>
>> response file (see test backslash-in-response-file.c in the patch).<br>
>><br>
>> This patch also adds XFAIL win32 to the driver test Driver/at_file.c.<br>
>> That test verifies that the driver correctly expands arguments<br>
>> surrounded by single quotes. On Windows, that test would start failing<br>
>> because, single quotation marks cannot be used to identify single<br>
>> arguments.<br>
>><br>
>> The fix for Driver/at_file.c is probably not ideal. Adding XFAIL win32<br>
>> means that the test would be an expected failure if the target triple<br>
>> contains 'win32'. This is ok in general if both host and target are<br>
>> the same (i.e. we are not testing a cross-compiler). This is a problem<br>
>> however for cross compilers where the host is win32 but the target is<br>
>> not  win32.<br>
>><br>
>> At the moment there is no way to tell lit that the test should fail<br>
>> based on the information of the host platform (and not only on the<br>
>> target triple). I have an idea about how to improve LIT and<br>
>> consequently test Driver/at_file.c. If ok, I plan to send another<br>
>> patch for improving it.<br>
>><br>
>> Please let me know if this patch is ok to submit.<br>
>><br>
>> Thanks in advance,<br>
>><br>
>> Andrea Di Biagio<br>
>> SN Systems - Sony Computer Entertainment Group<br>
</div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>