From 2e27459d6c016cd0e49151fb3cd0c5c64b858412 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 13 Aug 2013 23:38:57 +0000 Subject: clang-cl: Support /link option and set target to win32 This adds support for the /link option, which forwards subsequent arguments to the linker. The test for this will only work when targetting win32. Since that's the only target where clang-cl makes sense, use that target by default. Differential Revision: http://llvm-reviews.chandlerc.com/D1388 llvm-svn: 188331 --- clang/test/Driver/cl-link.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Driver/cl-link.c (limited to 'clang/test/Driver/cl-link.c') diff --git a/clang/test/Driver/cl-link.c b/clang/test/Driver/cl-link.c new file mode 100644 index 00000000000..6de089ba0c9 --- /dev/null +++ b/clang/test/Driver/cl-link.c @@ -0,0 +1,12 @@ +// Don't attempt slash switches on msys bash. +// REQUIRES: shell-preserves-root + +// Note: %s must be preceded by -- or bound to another option, otherwise it may +// be interpreted as a command-line option, e.g. on Mac where %s is commonly +// under /Users. + +// RUN: %clang_cl /Tc%s -### /link foo bar baz 2>&1 | FileCheck %s +// CHECK: link.exe +// CHECK: "foo" +// CHECK: "bar" +// CHECK: "baz" -- cgit v1.2.3