teak-llvm/clang/test/Driver/cc1-spawnprocess.c
Nico Weber 8e5018e990 Replace CLANG_SPAWN_CC1 env var with a driver mode flag
Flags are clang's default UI is flags.

We can have an env var in addition to that, but in D69825 nobody has yet
mentioned why this needs an env var, so omit it for now.  If someone
needs to set the flag via env var, the existing CCC_OVERRIDE_OPTIONS
mechanism works for it (set CCC_OVERRIDE_OPTIONS=+-fno-integrated-cc1
for example).

Also mention the cc1-in-process change in the release notes.

Also spruce up the test a bit so it actually tests something :)

Differential Revision: https://reviews.llvm.org/D72769
2020-01-15 12:22:40 -05:00

23 lines
936 B
C

// RUN: %clang -fintegrated-cc1 -### %s 2>&1 | FileCheck %s --check-prefix=YES
// RUN: %clang -fno-integrated-cc1 -### %s 2>&1 | FileCheck %s --check-prefix=NO
// RUN: %clang -fintegrated-cc1 -fno-integrated-cc1 -### %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=NO
// RUN: %clang -fno-integrated-cc1 -fintegrated-cc1 -### %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=YES
// RUN: %clang_cl -fintegrated-cc1 -### -- %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=YES
// RUN: %clang_cl -fno-integrated-cc1 -### -- %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=NO
// RUN: env CCC_OVERRIDE_OPTIONS=+-fintegrated-cc1 \
// RUN: %clang -fintegrated-cc1 -### %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=YES
// RUN: env CCC_OVERRIDE_OPTIONS=+-fno-integrated-cc1 \
// RUN: %clang -fintegrated-cc1 -### %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=NO
// YES: (in-process)
// NO-NOT: (in-process)