Driver: Forward -Wl, and -Xlink arguments when using windows linker

Differential Revision: http://llvm-reviews.chandlerc.com/D1394

llvm-svn: 188346
This commit is contained in:
Hans Wennborg 2013-08-14 01:24:35 +00:00
parent b31493d60c
commit be4a6768f1
2 changed files with 10 additions and 1 deletions

View File

@ -6597,7 +6597,8 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
if (it->isFilename())
CmdArgs.push_back(it->getFilename());
// FIXME: Forward -Wl, etc.
else
it->getInputArg().renderAsInput(Args, CmdArgs);
}
const char *Exec =

View File

@ -14,3 +14,11 @@
// DARWIN-NOT: --no-demangle
// DARWIN: "one" "two" "three" "four"
// LINUX: "--no-demangle" "one" "two" "three" "four"
// Check that we forward '-Xlinker' and '-Wl,' on Windows.
// RUN: %clang -target i686-pc-win32 -### \
// RUN: -Xlinker one -Wl,two %s 2>&1 | \
// RUN: FileCheck -check-prefix=WIN %s
// WIN: link.exe
// WIN: "one"
// WIN: "two"