[cfe-commits] Forwarding -l arguments to link.exe
Nikola Smiljanic
popizdeh at gmail.com
Thu Jun 7 23:32:55 PDT 2012
Here's my attempt to get this working. I think the call to AddLinkerInputs
is not needed here because it handles inputs only for gcc compatible
driver. If this function gets called it will pass -l arguments to link.exe
which doesn't know how to handle them. The only part we need from this
function is handling of input files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120608/7f1cbef2/attachment.html>
-------------- next part --------------
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 158164)
+++ lib/Driver/Tools.cpp (working copy)
@@ -5663,8 +5663,17 @@
CmdArgs.push_back("-nologo");
- AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
+ Args.AddAllArgValues(CmdArgs, options::OPT_l);
+ for (InputInfoList::const_iterator
+ it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
+ const InputInfo &II = *it;
+
+ // Add filenames immediately.
+ if (II.isFilename())
+ CmdArgs.push_back(II.getFilename());
+ }
+
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("link.exe"));
C.addCommand(new Command(JA, *this, Exec, CmdArgs));
More information about the cfe-commits
mailing list