30 lines · c
1/// This test validates that the various ways to assign an invalid deployment version are captured and detected.2// REQUIRES: system-darwin && native3 4// RUN: rm -rf %t5// RUN: split-file %s %t6 7// RUN: env SDKROOT=%t/iPhoneOS21.0.sdk not %clang -m64 -c -### %s 2>&1 \8// RUN: | FileCheck %s --check-prefix=SDKROOT9 10// RUN: not %clang -isysroot %t/iPhoneOS21.0.sdk -m64 -c -### %s 2>&1 \11// RUN: | FileCheck %s --check-prefix=SYSROOT12 13// RUN: not %clang -target arm64-apple-ios21 -c -### %s 2>&1 \14// RUN: | FileCheck %s --check-prefix=TARGET15 16// RUN: not %clang -mtargetos=ios21 -arch arm64 -c -### %s 2>&1 \17// RUN: | FileCheck %s --check-prefix=MTARGET18 19// RUN: env IPHONEOS_DEPLOYMENT_TARGET=21.0 not %clang -arch arm64 -c -### %s 2>&1 \20// RUN: | FileCheck %s --check-prefix=DEPLOY_VAR21 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.json29{"Version":"21.0", "MaximumDeploymentTarget": "21.0.99"}30