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.
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));
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits