19 lines · c
1// PR17239 - The /link option, when inside a response file, should only extend2// until the end of the response file (and not the entire command line)3 4// Note: %s must be preceded by -- or bound to another option, otherwise it may5// be interpreted as a command-line option, e.g. on Mac where %s is commonly6// under /Users.7 8// RUN: echo /link bar.lib baz.lib > %t.args9// RUN: touch %t.obj10// RUN: %clang_cl -fuse-ld=link -### @%t.args -- %t.obj 2>&1 | FileCheck %s -check-prefix=ARGS11// 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 will13// be clueless and will emit "argument unused" warnings. If PR17239 is properly14// fixed, this should not happen because the "/link" option is restricted to15// consume only remaining args in its response file.16// ARGS-NOT: argument unused during compilation17// Identify the linker command18// ARGS: link.exe19