[LLVMbugs] [Bug 17239] New: clang-cl: /link option in @response file should only consume args until end of current line

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 13 15:23:56 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17239

            Bug ID: 17239
           Summary: clang-cl: /link option in @response file should only
                    consume args until end of current line
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 13707
    Classification: Unclassified

The '/link' command-line option takes the following arguments on the
command-line and passes them to the linker.

To be compatible with cl.exe, when /link occurs in a response file, it should
only capture arguments until the _end of the current line in that file_ -- not
until the end of the entire expanded command-line as clang-cl currently does.

This occurs in the wild in ninja files generated by cmake on windows. It will
generate a response file like

  @foo.rsp:
  foo.obj /link bar.lib baz.lib

And then invoke cl.exe:

  cl.exe <somecompilerflags> @foo.rsp /link <morelinkerflags>

When run with clang-cl, this results in the linker complaining about the second
/link argument, since we've just passed along everything since we saw the first
/link in the response file.

I found this mentioned here:
http://msdn.microsoft.com/en-us/library/ms925492.aspx

Filing this mostly to keep track of it, probably not very high priority right
now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130913/45cff503/attachment.html>


More information about the llvm-bugs mailing list