blob: 520093c30230fa3f2ee38b7037a114b1530760d9 [file] [log] [blame]
Hans Wennborg75958c42013-08-08 00:17:41 +00001// Don't attempt slash switches on msys bash.
2// REQUIRES: shell-preserves-root
3
4// Note: %s must be preceded by --, otherwise it may be interpreted as a
5// command-line option, e.g. on Mac where %s is commonly under /Users.
6
7// First check that regular clang doesn't do any of this stuff.
8// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=CHECK-CLANG %s
9// CHECK-CLANG-NOT: "-D_DEBUG"
10// CHECK-CLANG-NOT: "-D_MT"
11// CHECK-CLANG-NOT: "-D_DLL"
12// CHECK-CLANG-NOT: --dependent-lib
13
14// RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s
15// RUN: %clang_cl -### /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s
16// CHECK-MT-NOT: "-D_DEBUG"
17// CHECK-MT: "-D_MT"
18// CHECK-MT-NOT: "-D_DLL"
19// CHECK-MT: "--dependent-lib=libcmt"
20// CHECK-MT: "--dependent-lib=oldnames"
21
22// RUN: %clang_cl -### /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTd %s
23// CHECK-MTd: "-D_DEBUG"
24// CHECK-MTd: "-D_MT"
25// CHECK-MTd-NOT: "-D_DLL"
26// CHECK-MTd: "--dependent-lib=libcmtd"
27// CHECK-MTd: "--dependent-lib=oldnames"
28
29// RUN: %clang_cl -### /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-MD %s
30// CHECK-MD-NOT: "-D_DEBUG"
31// CHECK-MD: "-D_MT"
32// CHECK-MD: "-D_DLL"
33// CHECK-MD: "--dependent-lib=msvcrt"
34// CHECK-MD: "--dependent-lib=oldnames"
35
36// RUN: %clang_cl -### /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MDd %s
37// CHECK-MDd: "-D_DEBUG"
38// CHECK-MDd: "-D_MT"
39// CHECK-MDd: "-D_DLL"
40// CHECK-MDd: "--dependent-lib=msvcrtd"
41// CHECK-MDd: "--dependent-lib=oldnames"