12de36d03SJan Svoboda // REQUIRES: system-darwin 22de36d03SJan Svoboda 3a8567000SJan Svoboda // RUN: rm -rf %t && mkdir -p %t 4a8567000SJan Svoboda // RUN: %clang -fdriver-only -o %t/out %s -mtargetos=macos12 -arch arm64 -arch x86_64 -MJ %t/compilation_database.json 592c6ffa1SJan Svoboda 692c6ffa1SJan Svoboda // Let's run that again and verify we're not accumulating redundant entries in the same file. 7*5c29ffdaSFangrui Song // 892c6ffa1SJan Svoboda // RUN: %clang -fdriver-only -o %t/out %s -mtargetos=macos12 -arch arm64 -arch x86_64 -MJ %t/compilation_database.json 992c6ffa1SJan Svoboda // RUN: echo EOF >> %t/compilation_database.json 1092c6ffa1SJan Svoboda 11a8567000SJan Svoboda // RUN: FileCheck --input-file=%t/compilation_database.json %s 12a8567000SJan Svoboda 139ec7e4dfSJan Svoboda // CHECK-DAG: { "directory": "{{.*}}", "file": "{{.*}}", "output": "[[OUTPUT_X86_64:.*]]", "arguments": [{{.*}}, "-o", "[[OUTPUT_X86_64]]", {{.*}} "--target=x86_64-apple-macosx12.0.0"]}, 149ec7e4dfSJan Svoboda // CHECK-DAG: { "directory": "{{.*}}", "file": "{{.*}}", "output": "[[OUTPUT_ARM64:.*]]", "arguments": [{{.*}}, "-o", "[[OUTPUT_ARM64]]", {{.*}} "--target=arm64-apple-macosx12.0.0"]}, 159ec7e4dfSJan Svoboda // CHECK: EOF 16