phunix/external/bsd/llvm/dist/clang/test/Driver/cl-link-at-file.c
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

23 lines
1.0 KiB
C

// PR17239 - The /link option, when inside a response file, should only extend
// until the end of the response file (and not the entire command line)
// Don't attempt slash switches on msys bash.
// REQUIRES: shell-preserves-root
// Note: %s must be preceded by -- or bound to another option, otherwise it may
// be interpreted as a command-line option, e.g. on Mac where %s is commonly
// under /Users.
// RUN: echo /link bar.lib baz.lib > %t.args
// RUN: touch %t.obj
// RUN: %clang_cl -### @%t.args -- %t.obj 2>&1 | FileCheck %s -check-prefix=ARGS
// If the "/link" option captures all remaining args beyond its response file,
// it will also capture "--" and our input argument. In this case, Clang will
// be clueless and will emit "argument unused" warnings. If PR17239 is properly
// fixed, this should not happen because the "/link" option is restricted to
// consume only remaining args in its response file.
// ARGS-NOT: warning
// ARGS-NOT: argument unused during compilation
// Identify the linker command
// ARGS: link.exe