clang-cl: /link option in @​response file should only consume args until end of current line #17613
Labels
bugzilla
Issues migrated from bugzilla
clang:driver
'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Extended Description
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 @foo.rsp /link
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.
The text was updated successfully, but these errors were encountered: