| 1 |
// REQUIRES: system-darwin && target={{.*}}-{{darwin|macos}}{{.*}} |
| 2 |
|
| 3 |
// RUN: rm -rf %t && mkdir -p %t |
| 4 |
// RUN: %clang -fdriver-only -o %t/out %s -mtargetos=macos12 -arch arm64 -arch x86_64 -MJ %t/compilation_database.json |
| 5 |
|
| 6 |
// Let's run that again and verify we're not accumulating redundant entries in the same file. |
| 7 |
// |
| 8 |
// RUN: %clang -fdriver-only -o %t/out %s -mtargetos=macos12 -arch arm64 -arch x86_64 -MJ %t/compilation_database.json |
| 9 |
// RUN: echo EOF >> %t/compilation_database.json |
| 10 |
|
| 11 |
// RUN: FileCheck --input-file=%t/compilation_database.json %s |
| 12 |
|
| 13 |
// CHECK-DAG: { "directory": "{{.*}}", "file": "{{.*}}", "output": "[[OUTPUT_X86_64:.*]]", "arguments": [{{.*}}, "-o", "[[OUTPUT_X86_64]]", {{.*}} "--target=x86_64-apple-macosx12.0.0"]}, |
| 14 |
// CHECK-DAG: { "directory": "{{.*}}", "file": "{{.*}}", "output": "[[OUTPUT_ARM64:.*]]", "arguments": [{{.*}}, "-o", "[[OUTPUT_ARM64]]", {{.*}} "--target=arm64-apple-macosx12.0.0"]}, |
| 15 |
// CHECK: EOF |