1f4a2713aSLionel Sambuc // Don't attempt slash switches on msys bash. 2f4a2713aSLionel Sambuc // REQUIRES: shell-preserves-root 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc // Note: %s must be preceded by -- or bound to another option, otherwise it may 5f4a2713aSLionel Sambuc // be interpreted as a command-line option, e.g. on Mac where %s is commonly 6f4a2713aSLionel Sambuc // under /Users. 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc // RUN: %clang_cl /Tc%s -### /link foo bar baz 2>&1 | FileCheck --check-prefix=LINK %s 9f4a2713aSLionel Sambuc // LINK: link.exe 10f4a2713aSLionel Sambuc // LINK: "foo" 11f4a2713aSLionel Sambuc // LINK: "bar" 12f4a2713aSLionel Sambuc // LINK: "baz" 13f4a2713aSLionel Sambuc 14f4a2713aSLionel Sambuc // RUN: %clang_cl /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s 15f4a2713aSLionel Sambuc // ASAN: link.exe 16f4a2713aSLionel Sambuc // ASAN: "-debug" 17f4a2713aSLionel Sambuc // ASAN: "-incremental:no" 18f4a2713aSLionel Sambuc // ASAN: "{{.*}}clang_rt.asan-i386.lib" 19*0a6a1f1dSLionel Sambuc // ASAN: "{{.*}}clang_rt.asan_cxx-i386.lib" 20f4a2713aSLionel Sambuc // ASAN: "{{.*}}cl-link{{.*}}.obj" 21f4a2713aSLionel Sambuc 22*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /MD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-MD %s 23*0a6a1f1dSLionel Sambuc // ASAN-MD: link.exe 24*0a6a1f1dSLionel Sambuc // ASAN-MD: "-debug" 25*0a6a1f1dSLionel Sambuc // ASAN-MD: "-incremental:no" 26*0a6a1f1dSLionel Sambuc // ASAN-MD: "{{.*}}clang_rt.asan_dynamic-i386.lib" 27*0a6a1f1dSLionel Sambuc // ASAN-MD: "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib" 28*0a6a1f1dSLionel Sambuc // ASAN-MD: "-include:___asan_seh_interceptor" 29*0a6a1f1dSLionel Sambuc // ASAN-MD: "{{.*}}cl-link{{.*}}.obj" 30*0a6a1f1dSLionel Sambuc 31f4a2713aSLionel Sambuc // RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s 32f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s 33f4a2713aSLionel Sambuc // DLL: link.exe 34f4a2713aSLionel Sambuc // "-dll" 35f4a2713aSLionel Sambuc 36f4a2713aSLionel Sambuc // RUN: %clang_cl /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s 37f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s 38f4a2713aSLionel Sambuc // ASAN-DLL: link.exe 39f4a2713aSLionel Sambuc // ASAN-DLL: "-dll" 40f4a2713aSLionel Sambuc // ASAN-DLL: "-debug" 41f4a2713aSLionel Sambuc // ASAN-DLL: "-incremental:no" 42f4a2713aSLionel Sambuc // ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib" 43f4a2713aSLionel Sambuc // ASAN-DLL: "{{.*}}cl-link{{.*}}.obj" 44*0a6a1f1dSLionel Sambuc 45*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Zi /Tc%s -### 2>&1 | FileCheck --check-prefix=DEBUG %s 46*0a6a1f1dSLionel Sambuc // DEBUG: link.exe 47*0a6a1f1dSLionel Sambuc // DEBUG: "-debug" 48