blob: 50ae07fadf5bf0beb11c4eff09b5d6fc2fd65e7c [file] [log] [blame]
Reid Kleckneraf5fd6a2014-08-22 19:29:30 +00001// PR17239 - The /link option, when inside a response file, should only extend
2// until the end of the response file (and not the entire command line)
3
Reid Kleckneraf5fd6a2014-08-22 19:29:30 +00004// Note: %s must be preceded by -- or bound to another option, otherwise it may
5// be interpreted as a command-line option, e.g. on Mac where %s is commonly
6// under /Users.
7
8// RUN: echo /link bar.lib baz.lib > %t.args
9// RUN: touch %t.obj
10// RUN: %clang_cl -### @%t.args -- %t.obj 2>&1 | FileCheck %s -check-prefix=ARGS
11// If the "/link" option captures all remaining args beyond its response file,
12// it will also capture "--" and our input argument. In this case, Clang will
13// be clueless and will emit "argument unused" warnings. If PR17239 is properly
14// fixed, this should not happen because the "/link" option is restricted to
15// consume only remaining args in its response file.
Reid Kleckneraf5fd6a2014-08-22 19:29:30 +000016// ARGS-NOT: argument unused during compilation
17// Identify the linker command
18// ARGS: link.exe