1 // Note: %s must be preceded by -- or bound to another option, otherwise it may 2 // be interpreted as a command-line option, e.g. on Mac where %s is commonly 3 // under /Users. 4 5 // RUN: %clang_cl /Tc%s -### /link foo bar baz 2>&1 | FileCheck --check-prefix=LINK %s 6 // RUN: %clang_cl /Tc%s -### /linkfoo bar baz 2>&1 | FileCheck --check-prefix=LINK %s 7 // LINK: link.exe 8 // LINK: "foo" 9 // LINK: "bar" 10 // LINK: "baz" 11 12 // RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s 13 // ASAN: link.exe 14 // ASAN: "-debug" 15 // ASAN: "-incremental:no" 16 // ASAN: "{{.*}}clang_rt.asan-i386.lib" 17 // ASAN: "{{.*}}clang_rt.asan_cxx-i386.lib" 18 // ASAN: "{{.*}}cl-link{{.*}}.obj" 19 20 // RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /MD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-MD %s 21 // ASAN-MD: link.exe 22 // ASAN-MD: "-debug" 23 // ASAN-MD: "-incremental:no" 24 // ASAN-MD: "{{.*}}clang_rt.asan_dynamic-i386.lib" 25 // ASAN-MD: "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib" 26 // ASAN-MD: "-include:___asan_seh_interceptor" 27 // ASAN-MD: "{{.*}}cl-link{{.*}}.obj" 28 29 // RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s 30 // RUN: %clang_cl /LDd -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s 31 // DLL: link.exe 32 // "-dll" 33 34 // RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s 35 // RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s 36 // ASAN-DLL: link.exe 37 // ASAN-DLL: "-dll" 38 // ASAN-DLL: "-debug" 39 // ASAN-DLL: "-incremental:no" 40 // ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib" 41 // ASAN-DLL: "{{.*}}cl-link{{.*}}.obj" 42 43 // RUN: %clang_cl /Zi /Tc%s -### 2>&1 | FileCheck --check-prefix=DEBUG %s 44 // DEBUG: link.exe 45 // DEBUG: "-debug" 46 47 // PR27234 48 // RUN: %clang_cl /Tc%s nonexistent.obj -### /link /libpath:somepath 2>&1 | FileCheck --check-prefix=NONEXISTENT %s 49 // RUN: %clang_cl /Tc%s nonexistent.lib -### /link /libpath:somepath 2>&1 | FileCheck --check-prefix=NONEXISTENT %s 50 // NONEXISTENT-NOT: no such file 51 // NONEXISTENT: link.exe 52 // NONEXISTENT: "/libpath:somepath" 53 // NONEXISTENT: nonexistent 54