Hans Wennborg | 2e27459 | 2013-08-13 23:38:57 +0000 | [diff] [blame] | 1 | // Don't attempt slash switches on msys bash. |
| 2 | // REQUIRES: shell-preserves-root |
| 3 | |
| 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 |
| 6 | // under /Users. |
| 7 | |
Hans Wennborg | 65f1752 | 2013-08-27 18:10:21 +0000 | [diff] [blame] | 8 | // RUN: %clang_cl /Tc%s -### /link foo bar baz 2>&1 | FileCheck --check-prefix=LINK %s |
| 9 | // LINK: link.exe |
| 10 | // LINK: "foo" |
| 11 | // LINK: "bar" |
| 12 | // LINK: "baz" |
| 13 | |
| 14 | // RUN: %clang_cl /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s |
| 15 | // ASAN: link.exe |
Hans Wennborg | 0517e75 | 2013-08-28 17:36:07 +0000 | [diff] [blame] | 16 | // ASAN: "-debug" |
Hans Wennborg | d024c1c | 2013-08-30 10:50:52 +0000 | [diff] [blame] | 17 | // ASAN: "-incremental:no" |
Hans Wennborg | 65f1752 | 2013-08-27 18:10:21 +0000 | [diff] [blame] | 18 | // ASAN: "{{.*}}clang_rt.asan-i386.lib" |
Alexey Samsonov | 6424e02 | 2014-05-12 20:20:20 +0000 | [diff] [blame] | 19 | // ASAN: "{{.*}}clang_rt.asan_cxx-i386.lib" |
Hans Wennborg | 65f1752 | 2013-08-27 18:10:21 +0000 | [diff] [blame] | 20 | // ASAN: "{{.*}}cl-link{{.*}}.obj" |
Hans Wennborg | f1a7425 | 2013-09-10 20:18:04 +0000 | [diff] [blame] | 21 | |
Timur Iskhodzhanov | 6903e10 | 2014-08-26 10:08:24 +0000 | [diff] [blame] | 22 | // RUN: %clang_cl /MD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-MD %s |
| 23 | // ASAN-MD: link.exe |
| 24 | // ASAN-MD: "-debug" |
| 25 | // ASAN-MD: "-incremental:no" |
| 26 | // ASAN-MD: "{{.*}}clang_rt.asan_dynamic-i386.lib" |
Timur Iskhodzhanov | 7083c0e | 2014-09-12 13:47:44 +0000 | [diff] [blame] | 27 | // ASAN-MD: "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib" |
Timur Iskhodzhanov | 651725e | 2014-09-12 14:01:30 +0000 | [diff] [blame^] | 28 | // ASAN-MD: "-include:___asan_seh_interceptor" |
Timur Iskhodzhanov | 6903e10 | 2014-08-26 10:08:24 +0000 | [diff] [blame] | 29 | // ASAN-MD: "{{.*}}cl-link{{.*}}.obj" |
| 30 | |
Hans Wennborg | 4e6bec7 | 2013-09-10 20:53:34 +0000 | [diff] [blame] | 31 | // RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s |
| 32 | // RUN: %clang_cl /LDd -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s |
Hans Wennborg | f1a7425 | 2013-09-10 20:18:04 +0000 | [diff] [blame] | 33 | // DLL: link.exe |
| 34 | // "-dll" |
| 35 | |
| 36 | // RUN: %clang_cl /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s |
| 37 | // RUN: %clang_cl /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s |
| 38 | // ASAN-DLL: link.exe |
| 39 | // ASAN-DLL: "-dll" |
| 40 | // ASAN-DLL: "-debug" |
| 41 | // ASAN-DLL: "-incremental:no" |
Timur Iskhodzhanov | 3b6adcb6 | 2013-09-11 11:45:31 +0000 | [diff] [blame] | 42 | // ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib" |
Hans Wennborg | f1a7425 | 2013-09-10 20:18:04 +0000 | [diff] [blame] | 43 | // ASAN-DLL: "{{.*}}cl-link{{.*}}.obj" |
Hans Wennborg | bbb5f07 | 2014-04-25 16:24:19 +0000 | [diff] [blame] | 44 | |
| 45 | // RUN: %clang_cl /Zi /Tc%s -### 2>&1 | FileCheck --check-prefix=DEBUG %s |
| 46 | // DEBUG: link.exe |
| 47 | // DEBUG: "-debug" |