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 
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
16 // ASAN: "-debug"
17 // ASAN: "-incremental:no"
18 // ASAN: "{{.*}}clang_rt.asan-i386.lib"
19 // ASAN: "{{.*}}cl-link{{.*}}.obj"
20 
21 // RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s
22 // RUN: %clang_cl /LDd -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s
23 // DLL: link.exe
24 // "-dll"
25 
26 // RUN: %clang_cl /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
27 // RUN: %clang_cl /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
28 // ASAN-DLL: link.exe
29 // ASAN-DLL: "-dll"
30 // ASAN-DLL: "-debug"
31 // ASAN-DLL: "-incremental:no"
32 // ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib"
33 // ASAN-DLL: "{{.*}}cl-link{{.*}}.obj"
34