[PATCH] Driver: Forward -Wl, and -Xlink arguments when using windows linker
Hans Wennborg
hans at chromium.org
Tue Aug 13 17:31:24 PDT 2013
Hi rnk,
Please take a look.
http://llvm-reviews.chandlerc.com/D1394
Files:
lib/Driver/Tools.cpp
test/Driver/Xlinker-args.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -6597,7 +6597,8 @@
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 =
Index: test/Driver/Xlinker-args.c
===================================================================
--- test/Driver/Xlinker-args.c
+++ test/Driver/Xlinker-args.c
@@ -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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1394.1.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130813/5133bc37/attachment.bin>
More information about the cfe-commits
mailing list