| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: split-file %s %t |
| 3 |
|
| 4 |
// Check that with a sufficiently new SDK not searching for module maps in subdirectories. |
| 5 |
|
| 6 |
// New SDK. |
| 7 |
// RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -### 2>&1 \ |
| 8 |
// RUN: | FileCheck --check-prefix=NO-SUBDIRECTORIES %t/test.c |
| 9 |
// Old SDK. |
| 10 |
// RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX14.0.sdk -fmodules %t/test.c -### 2>&1 \ |
| 11 |
// RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c |
| 12 |
// Non-Darwin platform. |
| 13 |
// RUN: %clang -target i386-unknown-linux -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -### 2>&1 \ |
| 14 |
// RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c |
| 15 |
// New SDK overriding the default. |
| 16 |
// RUN: %clang -target x86_64-apple-macos10.13 -isysroot %t/MacOSX15.0.sdk -fmodules %t/test.c -fmodulemap-allow-subdirectory-search -### 2>&1 \ |
| 17 |
// RUN: | FileCheck --check-prefix=SEARCH-SUBDIRECTORIES %t/test.c |
| 18 |
|
| 19 |
//--- test.c |
| 20 |
// NO-SUBDIRECTORIES: "-fno-modulemap-allow-subdirectory-search" |
| 21 |
// SEARCH-SUBDIRECTORIES-NOT: "-fno-modulemap-allow-subdirectory-search" |
| 22 |
|
| 23 |
//--- MacOSX15.0.sdk/SDKSettings.json |
| 24 |
{"Version":"15.0", "CanonicalName": "macosx15.0", "MaximumDeploymentTarget": "15.0.99", |
| 25 |
"SupportedTargets": { |
| 26 |
"macosx": {"Archs": ["x86_64", "x86_64h", "arm64", "arm64e"], "LLVMTargetTripleVendor": "apple", "LLVMTargetTripleSys": "macos", "LLVMTargetTripleEnvironment": "", "SystemPrefix": ""}, |
| 27 |
"iosmac": {"Archs": ["x86_64", "x86_64h", "arm64", "arm64e"], "LLVMTargetTripleVendor": "apple", "LLVMTargetTripleSys": "ios", "LLVMTargetTripleEnvironment": "macabi", "SystemPrefix": "\/System\/iOSSupport"} |
| 28 |
}} |
| 29 |
|
| 30 |
//--- MacOSX14.0.sdk/SDKSettings.json |
| 31 |
{"Version":"14.0", "CanonicalName": "macosx14.0", "MaximumDeploymentTarget": "14.0.99", |
| 32 |
"SupportedTargets": { |
| 33 |
"macosx": {"Archs": ["x86_64", "x86_64h", "arm64", "arm64e"], "LLVMTargetTripleVendor": "apple", "LLVMTargetTripleSys": "macos", "LLVMTargetTripleEnvironment": "", "SystemPrefix": ""}, |
| 34 |
"iosmac": {"Archs": ["x86_64", "x86_64h", "arm64", "arm64e"], "LLVMTargetTripleVendor": "apple", "LLVMTargetTripleSys": "ios", "LLVMTargetTripleEnvironment": "macabi", "SystemPrefix": "\/System\/iOSSupport"} |
| 35 |
}} |