Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-cl: /link option in @​response file should only consume args until end of current line #17613

Closed
zmodem opened this issue Sep 14, 2013 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Comments

@zmodem
Copy link
Collaborator

zmodem commented Sep 14, 2013

Bugzilla Link 17239
Resolution FIXED
Resolved on Aug 22, 2014 23:30
Version trunk
OS Windows NT
Blocks #14079
CC @rafaelauler

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.

@rafaelauler
Copy link
Contributor

Fixed in r216281.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Projects
None yet
Development

No branches or pull requests

2 participants