summaryrefslogtreecommitdiff
path: root/test/Driver/cl-runtime-flags.c
blob: de8f9d83d89da3474ea7b3c1b2c090028fe47522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Note: %s must be preceded by --, otherwise it may be interpreted as a
// command-line option, e.g. on Mac where %s is commonly under /Users.

// First check that regular clang doesn't do any of this stuff.
// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=CHECK-CLANG %s
// CHECK-CLANG-NOT: "-D_DEBUG"
// CHECK-CLANG-NOT: "-D_MT"
// CHECK-CLANG-NOT: "-D_DLL"
// CHECK-CLANG-NOT: --dependent-lib

// RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s
// RUN: %clang_cl -### /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s
// CHECK-MT-NOT: "-D_DEBUG"
// CHECK-MT: "-D_MT"
// CHECK-MT-NOT: "-D_DLL"
// CHECK-MT: "--dependent-lib=libcmt"
// CHECK-MT: "--dependent-lib=oldnames"

// RUN: %clang_cl -### /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTd %s
// RUN: %clang_cl -### /LD /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTd %s
// CHECK-MTd: "-D_DEBUG"
// CHECK-MTd: "-D_MT"
// CHECK-MTd-NOT: "-D_DLL"
// CHECK-MTd: "--dependent-lib=libcmtd"
// CHECK-MTd: "--dependent-lib=oldnames"

// RUN: %clang_cl -### /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-MD %s
// CHECK-MD-NOT: "-D_DEBUG"
// CHECK-MD: "-D_MT"
// CHECK-MD: "-D_DLL"
// CHECK-MD: "--dependent-lib=msvcrt"
// CHECK-MD: "--dependent-lib=oldnames"

// RUN: %clang_cl -### /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MDd %s
// CHECK-MDd: "-D_DEBUG"
// CHECK-MDd: "-D_MT"
// CHECK-MDd: "-D_DLL"
// CHECK-MDd: "--dependent-lib=msvcrtd"
// CHECK-MDd: "--dependent-lib=oldnames"

// RUN: %clang_cl -### /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LD %s
// RUN: %clang_cl -### /LD /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-LD %s
// CHECK-LD-NOT: "-D_DEBUG"
// CHECK-LD: "-D_MT"
// CHECK-LD-NOT: "-D_DLL"
// CHECK-LD: "--dependent-lib=libcmt"

// RUN: %clang_cl -### /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDd %s
// RUN: %clang_cl -### /LDd /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDd %s
// CHECK-LDd: "-D_DEBUG"
// CHECK-LDd: "-D_MT"
// CHECK-LDd-NOT: "-D_DLL"
// CHECK-LDd: "--dependent-lib=libcmtd"

// RUN: %clang_cl -### /LDd /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMT %s
// RUN: %clang_cl -### /MT /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMT %s
// CHECK-LDdMT: "-D_DEBUG"
// CHECK-LDdMT: "-D_MT"
// CHECK-LDdMT-NOT: "-D_DLL"
// CHECK-LDdMT: "--dependent-lib=libcmt"

// RUN: %clang_cl -### /LD /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMD %s
// RUN: %clang_cl -### /MD /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMD %s
// CHECK-LDMD-NOT: "-D_DEBUG"
// CHECK-LDMD: "-D_MT"
// CHECK-LDMD: "-D_DLL"
// CHECK-LDMD: "--dependent-lib=msvcrt"

// RUN: %clang_cl -### /LDd /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMD %s
// RUN: %clang_cl -### /MD /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMD %s
// CHECK-LDdMD: "-D_DEBUG"
// CHECK-LDdMD: "-D_MT"
// CHECK-LDdMD: "-D_DLL"
// CHECK-LDdMD: "--dependent-lib=msvcrt"

// RUN: %clang_cl -### /LD /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s
// RUN: %clang_cl -### /MDd /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s
// RUN: %clang_cl -### /LDd /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s
// RUN: %clang_cl -### /MDd /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s
// CHECK-LDMDd: "-D_DEBUG"
// CHECK-LDMDd: "-D_MT"
// CHECK-LDMDd: "-D_DLL"
// CHECK-LDMDd: "--dependent-lib=msvcrtd"

// RUN: %clang_cl /MD /MT -### -- %s 2>&1 | FileCheck -check-prefix=MTOVERRIDE %s
// MTOVERRIDE: "--dependent-lib=libcmt"