[VS Toolchain] Correctly forward -l linker inputs to link.exe.
Patch by Nikola Smiljanic! llvm-svn: 158664
This commit is contained in:
parent
e881ce2ef6
commit
e2f493604a
|
@ -5739,7 +5739,14 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
|
||||
CmdArgs.push_back("-nologo");
|
||||
|
||||
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
|
||||
Args.AddAllArgValues(CmdArgs, options::OPT_l);
|
||||
|
||||
// Add filenames immediately.
|
||||
for (InputInfoList::const_iterator
|
||||
it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
|
||||
if (it->isFilename())
|
||||
CmdArgs.push_back(it->getFilename());
|
||||
}
|
||||
|
||||
const char *Exec =
|
||||
Args.MakeArgString(getToolChain().GetProgramPath("link.exe"));
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: %clang -target i686-pc-win32 -lkernel32.lib -luser32.lib -### %s 2>&1 | FileCheck %s
|
||||
// CHECK-NOT: "-lkernel32.lib"
|
||||
// CHECK-NOT: "-luser32.lib"
|
||||
// CHECK: "kernel32.lib"
|
||||
// CHECK: "user32.lib"
|
Loading…
Reference in New Issue