https://llvm.org/bugs/show_bug.cgi?id=27396

            Bug ID: 27396
           Summary: Response files with extra newlines (or '\r') aren't
                    tokenized correctly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

As a result of the fix for Bug 17239
(https://llvm.org/bugs/show_bug.cgi?id=17239),
llvm::cl::TokenizeGNUCommandLine() ends up inserting additional nullptr fields
into the new argv. This can cause problems for joined command line arguments
(like passing "-x c" on separate lines.

This now causes issues with the gradle build system because they default to
passing response files full of arguments. On Windows systems, these response
files contain "\r\n", which ends up inserting the additional nullptr into argv.

I think the issue with the original patch (from r216280), is that it is
inserting the extra nullptr fields in the middle of the loop constructing the
new argv. It should instead just insert a nullptr at the end of the response
file (which will allow it to work correctly for the only use-case of /link in
clang-cl.exe). I have a patch that I can upload after a bit more testing (and
adding an explicit new test for verifying this works appropriately for cases
with extra newlines and/or windows line endings).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to