brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · cf757f9 Raw
32 lines · c
1// Check that we can detect an implicit target when clang is invoked as2// <triple->clang. Using an implicit triple requires that the target actually3// is available, too.4// REQUIRES: x86-registered-target5 6// RUN: rm -rf %t7// RUN: split-file %s %t8// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json9 10// Check that we can deduce this both when using a compilation database, and when using11// a literal command line.12 13// RUN: clang-scan-deps -format experimental-full -compilation-database %t/cdb.json | FileCheck %s14 15// RUN: clang-scan-deps -format experimental-full -- x86_64-w64-mingw32-clang %t/source.c -o %t/source.o | FileCheck %s16 17// CHECK: "-triple",18// CHECK-NEXT: "x86_64-w64-windows-gnu",19 20 21//--- cdb.json.in22[23  {24    "directory": "DIR"25    "command": "x86_64-w64-mingw32-clang -c DIR/source.c -o DIR/source.o"26    "file": "DIR/source.c"27  },28]29 30//--- source.c31void func(void) {}32