Debian Codegraph @

clang/test/Driver/darwin-invalid-version-range.c

raw
1 /// This test validates that the various ways to assign an invalid deployment version are captured and detected.
2 // REQUIRES: system-darwin && native
3
4 // RUN: rm -rf %t
5 // RUN: split-file %s %t
6
7 // RUN: env SDKROOT=%t/iPhoneOS21.0.sdk not %clang -m64 -c -### %s 2>&1 \
8 // RUN: | FileCheck %s --check-prefix=SDKROOT
9
10 // RUN: not %clang -isysroot %t/iPhoneOS21.0.sdk -m64 -c -### %s 2>&1 \
11 // RUN: | FileCheck %s --check-prefix=SYSROOT
12
13 // RUN: not %clang -target arm64-apple-ios21 -c -### %s 2>&1 \
14 // RUN: | FileCheck %s --check-prefix=TARGET
15
16 // RUN: not %clang -mtargetos=ios21 -arch arm64 -c -### %s 2>&1 \
17 // RUN: | FileCheck %s --check-prefix=MTARGET
18
19 // RUN: env IPHONEOS_DEPLOYMENT_TARGET=21.0 not %clang -arch arm64 -c -### %s 2>&1 \
20 // RUN: | FileCheck %s --check-prefix=DEPLOY_VAR
21
22 // SDKROOT: error: invalid version number '21.0' inferred from '{{.*}}.sdk'
23 // SYSROOT: error: invalid version number '21.0' inferred from '{{.*}}.sdk'
24 // TARGET: error: invalid version number in '-target arm64-apple-ios21'
25 // MTARGET: error: invalid version number in '-mtargetos=ios21'
26 // DEPLOY_VAR: error: invalid version number in 'IPHONEOS_DEPLOYMENT_TARGET=21.0'
27
28 //--- iPhoneOS21.0.sdk/SDKSettings.json
29 {"Version":"21.0", "CanonicalName":"iphoneos21.0", "MaximumDeploymentTarget": "21.0.99",
30 "SupportedTargets": {
31 "iphoneos": {"Archs": ["arm64e", "arm64"], "LLVMTargetTripleVendor": "apple", "LLVMTargetTripleSys": "ios", "LLVMTargetTripleEnvironment": "","SystemPrefix": ""}
32 }}