llvm-project/clang/test/Driver/cc-print-options.c
Jan Svoboda c12577c61d [clang][driver] Introduce new -fdriver-only flag
This patch introduces the new -fdriver-only flag which instructs Clang to only execute the driver logic without running individual jobs. In a way, this is very similar to -###, with the following differences:
 * it doesn't automatically print all jobs,
 * it doesn't avoid side effects (e.g. it will generate compilation database when -MJ is specified).

This flag will be useful in testing D121997.

Reviewed By: dexonsmith, egorzhdan

Differential Revision: https://reviews.llvm.org/D127408
2022-06-13 13:30:56 +02:00

15 lines
383 B
C

// RUN: rm -f %t.log
// RUN: env CC_PRINT_OPTIONS=1 \
// RUN: CC_PRINT_OPTIONS_FILE=%t.log \
// RUN: %clang -S -o %t.s %s
// RUN: FileCheck %s < %t.log
// RUN: rm -f %t.log
// RUN: env CC_PRINT_OPTIONS=1 \
// RUN: CC_PRINT_OPTIONS_FILE=%t.log \
// RUN: %clang -fdriver-only -o %t.s %s
// RUN: FileCheck %s < %t.log
// CHECK: [Logging clang options]
// CHECK: {{.*}} "-cc1"