1 // 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)
4 // 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
8 // RUN: echo /link bar.lib baz.lib > %t.args
10 // RUN: %clang_cl -fuse-ld=link -### @%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.
16 // ARGS-NOT: argument unused during compilation
17 // Identify the linker command