2017-06-01 04:42:43 +08:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
// RUN: %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=BUILTIN
|
2017-06-01 19:41:21 +08:00
|
|
|
// BUILTIN: "-internal-isystem" "{{.*lib.*clang.*include}}"
|
2017-06-01 04:42:43 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cl -nobuiltininc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOBUILTIN
|
2017-06-01 19:41:21 +08:00
|
|
|
// NOBUILTIN-NOT: "-internal-isystem" "{{.*lib.*clang.*include}}"
|
2017-06-01 04:42:43 +08:00
|
|
|
|
|
|
|
// RUN: env INCLUDE=/my/system/inc %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=STDINC
|
|
|
|
// STDINC: "-internal-isystem" "/my/system/inc"
|
|
|
|
|
2018-03-01 03:49:07 +08:00
|
|
|
// -nostdinc suppresses all of %INCLUDE%, clang resource dirs, and -imsvc dirs.
|
|
|
|
// RUN: env INCLUDE=/my/system/inc %clang_cl -nostdinc -imsvc /my/other/inc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOSTDINC
|
|
|
|
// NOSTDINC: argument unused{{.*}}-imsvc
|
2017-06-01 04:42:43 +08:00
|
|
|
// NOSTDINC-NOT: "-internal-isystem" "/my/system/inc"
|
2018-03-01 04:58:06 +08:00
|
|
|
// NOSTDINC-NOT: "-internal-isystem" "{{.*lib.*clang.*include}}"
|
2018-03-01 03:49:07 +08:00
|
|
|
// NOSTDINC-NOT: "-internal-isystem" "/my/other/inc"
|
|
|
|
|
|
|
|
// /X suppresses %INCLUDE% but not clang resource dirs or -imsvc dirs.
|
|
|
|
// RUN: env INCLUDE=/my/system/inc %clang_cl /X -imsvc /my/other/inc -### -- %s 2>&1 | FileCheck %s --check-prefix=SLASHX
|
|
|
|
// SLASHX-NOT: "argument unused{{.*}}-imsvc"
|
|
|
|
// SLASHX-NOT: "-internal-isystem" "/my/system/inc"
|
2018-03-01 04:58:06 +08:00
|
|
|
// SLASHX: "-internal-isystem" "{{.*lib.*clang.*include}}"
|
2018-03-01 03:49:07 +08:00
|
|
|
// SLASHX: "-internal-isystem" "/my/other/inc"
|