diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-04-15 00:24:15 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-04-15 00:24:15 +0000 |
commit | 84ff1d37fca8ac6c0a01ab6f342b863946ccea35 (patch) | |
tree | 694c47615a6de77999ade8a9e9ea1eb6f1ef48c6 | |
parent | 40cfde3cb8f9fd5afe50396487b45b9b5f40a567 (diff) | |
download | bcm5719-llvm-84ff1d37fca8ac6c0a01ab6f342b863946ccea35.tar.gz bcm5719-llvm-84ff1d37fca8ac6c0a01ab6f342b863946ccea35.zip |
clang-cl: Make /link accept an optional joined argument.
For example, "cl.exe a.c /linkfoo bar" is a valid invocation and
forwards "foo" and "bar" to link.exe. This makes clang-cl handle
that kind of invocation.
Depends on LLVM r266394.
llvm-svn: 266395
-rw-r--r-- | clang/include/clang/Driver/CLCompatOptions.td | 6 | ||||
-rw-r--r-- | clang/test/Driver/cl-link.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/include/clang/Driver/CLCompatOptions.td b/clang/include/clang/Driver/CLCompatOptions.td index a91a3fbbd84..8061a227421 100644 --- a/clang/include/clang/Driver/CLCompatOptions.td +++ b/clang/include/clang/Driver/CLCompatOptions.td @@ -45,8 +45,8 @@ class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name, KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>; -class CLRemainingArgs<string name> : Option<["/", "-"], name, - KIND_REMAINING_ARGS>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; +class CLRemainingArgsJoined<string name> : Option<["/", "-"], name, + KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; // Aliases: // (We don't put any of these in cl_compile_Group as the options they alias are @@ -215,7 +215,7 @@ def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, MetaVarName<"<dir>">; def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; -def _SLASH_link : CLRemainingArgs<"link">, +def _SLASH_link : CLRemainingArgsJoined<"link">, HelpText<"Forward options to the linker">, MetaVarName<"<options>">; def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">; diff --git a/clang/test/Driver/cl-link.c b/clang/test/Driver/cl-link.c index 9813c51d80a..b3c0b64d053 100644 --- a/clang/test/Driver/cl-link.c +++ b/clang/test/Driver/cl-link.c @@ -3,6 +3,7 @@ // under /Users. // RUN: %clang_cl /Tc%s -### /link foo bar baz 2>&1 | FileCheck --check-prefix=LINK %s +// RUN: %clang_cl /Tc%s -### /linkfoo bar baz 2>&1 | FileCheck --check-prefix=LINK %s // LINK: link.exe // LINK: "foo" // LINK: "bar" |