brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 2a6151e Raw
109 lines · c
1// Note: %s must be preceded by --, otherwise it may be interpreted as a2// command-line option, e.g. on Mac where %s is commonly under /Users.3 4// First check that regular clang doesn't do any of this stuff.5// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=CHECK-CLANG %s6// CHECK-CLANG-NOT: "-D_DEBUG"7// CHECK-CLANG-NOT: "-D_MT"8// CHECK-CLANG-NOT: "-D_DLL"9// CHECK-CLANG-NOT: --dependent-lib10 11// RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s12// RUN: %clang_cl -### /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-MT %s13// RUN: %clang -### --target=x86_64-windows-msvc -fms-runtime-lib=static -- %s \14// RUN:   2>&1 | FileCheck -check-prefix=CHECK-MT %s15// CHECK-MT-NOT: "-D_DEBUG"16// CHECK-MT: "-D_MT"17// CHECK-MT-NOT: "-D_DLL"18// CHECK-MT: "-flto-visibility-public-std"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 %s23// RUN: %clang_cl -### /LD /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTd %s24// RUN: %clang -### --target=x86_64-windows-msvc -fms-runtime-lib=static_dbg \25// RUN:   -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTd %s26// CHECK-MTd: "-D_DEBUG"27// CHECK-MTd: "-D_MT"28// CHECK-MTd-NOT: "-D_DLL"29// CHECK-MTd: "-flto-visibility-public-std"30// CHECK-MTd: "--dependent-lib=libcmtd"31// CHECK-MTd: "--dependent-lib=oldnames"32 33// RUN: %clang_cl -### /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-MD %s34// RUN: %clang -### --target=x86_64-windows-msvc -fms-runtime-lib=dll -- %s \35// RUN:   2>&1 | FileCheck -check-prefix=CHECK-MD %s36// CHECK-MD-NOT: "-D_DEBUG"37// CHECK-MD: "-D_MT"38// CHECK-MD: "-D_DLL"39// CHECK-MD: "--dependent-lib=msvcrt"40// CHECK-MD: "--dependent-lib=oldnames"41 42// RUN: %clang_cl -### /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-MDd %s43// RUN: %clang -### --target=x86_64-windows-msvc -fms-runtime-lib=dll_dbg -- \44// RUN:   %s 2>&1 | FileCheck -check-prefix=CHECK-MDd %s45// CHECK-MDd: "-D_DEBUG"46// CHECK-MDd: "-D_MT"47// CHECK-MDd: "-D_DLL"48// CHECK-MDd: "--dependent-lib=msvcrtd"49// CHECK-MDd: "--dependent-lib=oldnames"50 51// RUN: %clang_cl -### /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LD %s52// RUN: %clang_cl -### /LD /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-LD %s53// CHECK-LD-NOT: "-D_DEBUG"54// CHECK-LD: "-D_MT"55// CHECK-LD-NOT: "-D_DLL"56// CHECK-LD: "--dependent-lib=libcmt"57 58// RUN: %clang_cl -### /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDd %s59// RUN: %clang_cl -### /LDd /MTd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDd %s60// CHECK-LDd: "-D_DEBUG"61// CHECK-LDd: "-D_MT"62// CHECK-LDd-NOT: "-D_DLL"63// CHECK-LDd: "--dependent-lib=libcmtd"64 65// RUN: %clang_cl -### /LDd /MT -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMT %s66// RUN: %clang_cl -### /MT /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMT %s67// CHECK-LDdMT: "-D_DEBUG"68// CHECK-LDdMT: "-D_MT"69// CHECK-LDdMT-NOT: "-D_DLL"70// CHECK-LDdMT: "--dependent-lib=libcmt"71 72// RUN: %clang_cl -### /LD /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMD %s73// RUN: %clang_cl -### /MD /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMD %s74// CHECK-LDMD-NOT: "-D_DEBUG"75// CHECK-LDMD: "-D_MT"76// CHECK-LDMD: "-D_DLL"77// CHECK-LDMD: "--dependent-lib=msvcrt"78 79// RUN: %clang_cl -### /LDd /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMD %s80// RUN: %clang_cl -### /MD /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDdMD %s81// CHECK-LDdMD: "-D_DEBUG"82// CHECK-LDdMD: "-D_MT"83// CHECK-LDdMD: "-D_DLL"84// CHECK-LDdMD: "--dependent-lib=msvcrt"85 86// RUN: %clang_cl -### /LD /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s87// RUN: %clang_cl -### /MDd /LD -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s88// RUN: %clang_cl -### /LDd /MDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s89// RUN: %clang_cl -### /MDd /LDd -- %s 2>&1 | FileCheck -check-prefix=CHECK-LDMDd %s90// CHECK-LDMDd: "-D_DEBUG"91// CHECK-LDMDd: "-D_MT"92// CHECK-LDMDd: "-D_DLL"93// CHECK-LDMDd: "--dependent-lib=msvcrtd"94 95// RUN: %clang_cl /MD /MT -### -- %s 2>&1 | FileCheck -check-prefix=MTOVERRIDE %s96// MTOVERRIDE: "--dependent-lib=libcmt"97 98// RUN: %clang_cl -### /Zl -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTZl %s99// RUN: %clang_cl -### /MT /Zl -- %s 2>&1 | FileCheck -check-prefix=CHECK-MTZl %s100// RUN: %clang -### --target=x86_64-windows-msvc -fms-runtime-lib=static \101// RUN:   -fms-omit-default-lib -- %s 2>&1 | FileCheck \102// RUN:   -check-prefix=CHECK-MTZl %s103// CHECK-MTZl-NOT: "-D_DEBUG"104// CHECK-MTZl: "-D_MT"105// CHECK-MTZl-NOT: "-D_DLL"106// CHECK-MTZl-SAME: "-D_VC_NODEFAULTLIB"107// CHECK-MTZl-NOT: "--dependent-lib=libcmt"108// CHECK-MTZl-NOT: "--dependent-lib=oldnames"109