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