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)
3 
4 // Don't attempt slash switches on msys bash.
5 // REQUIRES: shell-preserves-root
6 
7 // Note: %s must be preceded by -- or bound to another option, otherwise it may
8 // be interpreted as a command-line option, e.g. on Mac where %s is commonly
9 // under /Users.
10 
11 // RUN: echo /link bar.lib baz.lib > %t.args
12 // RUN: touch %t.obj
13 // RUN: %clang_cl -### @%t.args -- %t.obj 2>&1 | FileCheck %s -check-prefix=ARGS
14 // If the "/link" option captures all remaining args beyond its response file,
15 // it will also capture "--" and our input argument. In this case, Clang will
16 // be clueless and will emit "argument unused" warnings. If PR17239 is properly
17 // fixed, this should not happen because the "/link" option is restricted to
18 // consume only remaining args in its response file.
19 // ARGS-NOT: warning
20 // ARGS-NOT: argument unused during compilation
21 // Identify the linker command
22 // ARGS: link.exe
23