354 lines · c
1// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \2// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS %s3// CHECK-VERSION-IOS: "armv6k-apple-ios5.0.0"4// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.0 -c %s -### 2>&1 | \5// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s6// CHECK-VERSION-IOS2: "armv6k-apple-ios2.0.0"7// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.2 -c %s -### 2>&1 | \8// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS22 %s9// CHECK-VERSION-IOS22: "armv6k-apple-ios2.2.0"10// RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=3.0 -c %s -### 2>&1 | \11// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS3 %s12// CHECK-VERSION-IOS3: "armv6k-apple-ios3.0.0"13 14// RUN: env IPHONEOS_DEPLOYMENT_TARGET=11.0 \15// RUN: not %clang -target armv7-apple-darwin -c -### %s 2> %t.err16// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS4 %s17// CHECK-VERSION-IOS4: invalid iOS deployment version 'IPHONEOS_DEPLOYMENT_TARGET=11.0'18 19// RUN: not %clang -target armv7-apple-ios11.0 -c -### %s 2> %t.err20// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS41 %s21// CHECK-VERSION-IOS41: invalid iOS deployment version '-target armv7-apple-ios11.0'22 23// RUN: not %clang -target armv7-apple-darwin -miphoneos-version-min=11.0 -c -### %s 2> %t.err24// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS5 %s25// CHECK-VERSION-IOS5: invalid iOS deployment version '-miphoneos-version-min=11.0'26 27// RUN: not %clang -target i386-apple-darwin -mios-simulator-version-min=11.0 -c -### %s 2> %t.err28// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS6 %s29// CHECK-VERSION-IOS6: invalid iOS deployment version '-mios-simulator-version-min=11.0'30 31// RUN: not %clang -target armv7-apple-ios11.1 -c -### %s 2>&1 | \32// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS71 %s33// CHECK-VERSION-IOS71: invalid iOS deployment version34// RUN: %clang -target armv7-apple-darwin -Wno-missing-sysroot -isysroot SDKs/iPhoneOS11.0.sdk -c -### %s 2>&1 | \35// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS7 %s36// CHECK-VERSION-IOS7: thumbv7-apple-ios10.99.9937 38// RUN: env IPHONEOS_DEPLOYMENT_TARGET=11.0 \39// RUN: %clang -target arm64-apple-darwin -c -### %s 2>&1 | \40// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS8 %s41// CHECK-VERSION-IOS8: arm64-apple-ios11.0.042 43// RUN: %clang -target arm64-apple-ios11.0 -miphoneos-version-min=11.0 -c -### %s 2>&1 | \44// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS9 %s45// CHECK-VERSION-IOS9: arm64-apple-ios11.0.046 47// RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=11.0 -c -### %s 2>&1 | \48// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS10 %s49// CHECK-VERSION-IOS10: x86_64-apple-ios11.0.0-simulator50 51// RUN: %clang -target arm64-apple-darwin -mios-simulator-version-min=11.0 -c -### %s 2>&1 | \52// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS10-ARM64 %s53// CHECK-VERSION-IOS10-ARM64: arm64-apple-ios11.0.0-simulator54 55// RUN: %clang -target arm64-apple-ios11.1 -c -### %s 2>&1 | \56// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS11 %s57// CHECK-VERSION-IOS11: arm64-apple-ios11.1.058 59// RUN: %clang -target armv7-apple-ios9.0 -miphoneos-version-min=11.0 -c -Wno-invalid-ios-deployment-target -### %s 2>&1 | \60// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS12 %s61// CHECK-VERSION-IOS12: thumbv7-apple-ios9.0.062 63// RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \64// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s65// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.4 -c %s -### 2>&1 | \66// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s67// CHECK-VERSION-OSX4: "i686-apple-macosx10.4.0"68// RUN: %clang -target i686-apple-darwin9 -c %s -### 2>&1 | \69// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s70// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.5 -c %s -### 2>&1 | \71// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s72// CHECK-VERSION-OSX5: "i686-apple-macosx10.5.0"73// RUN: %clang -target i686-apple-darwin10 -c %s -### 2>&1 | \74// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s75// RUN: %clang -target i686-apple-darwin9 -mmacos-version-min=10.6 -c %s -### 2>&1 | \76// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s77// CHECK-VERSION-OSX6: "i686-apple-macosx10.6.0"78// RUN: %clang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \79// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s80// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \81// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s82// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \83// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s84// CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"85// RUN: not %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \86// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s87// RUN: not %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \88// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s89// CHECK-VERSION-MISSING: missing version number90// RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \91// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS20 %s92// RUN: %clang -target armv7-apple-darwin -mtvos-version-min=8.3 -c %s -### 2>&1 | \93// RUN: FileCheck --check-prefix=CHECK-VERSION-TVOS83 %s94// CHECK-VERSION-TVOS83: "thumbv7-apple-tvos8.3.0"95// RUN: %clang -target i386-apple-darwin -mtvos-simulator-version-min=8.3 -c %s -### 2>&1 | \96// RUN: FileCheck --check-prefix=CHECK-VERSION-TVSIM83 %s97// CHECK-VERSION-TVSIM83: "i386-apple-tvos8.3.0-simulator"98// RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \99// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS20 %s100// CHECK-VERSION-WATCHOS20: "thumbv7k-apple-watchos2.0.0"101// RUN: %clang -target i386-apple-darwin -mwatchos-simulator-version-min=2.0 -c %s -### 2>&1 | \102// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHSIM20 %s103// CHECK-VERSION-WATCHSIM20: "i386-apple-watchos2.0.0-simulator"104 105// RUN: %clang -target x86_64-apple-driverkit19.0 -c %s -### 2>&1 | \106// RUN: FileCheck --check-prefix=CHECK-VERSION-DRIVERKIT190 %s107// CHECK-VERSION-DRIVERKIT190: "x86_64-apple-driverkit19.0.0"108 109// Check environment variable gets interpreted correctly110// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 IPHONEOS_DEPLOYMENT_TARGET=2.0 \111// RUN: %clang -target i686-apple-darwin9 -c %s -### 2>&1 | \112// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s113// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 IPHONEOS_DEPLOYMENT_TARGET=2.0 \114// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \115// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s116 117// RUN: env MACOSX_DEPLOYMENT_TARGET=10.4.10 \118// RUN: %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \119// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX49 %s120// CHECK-VERSION-OSX49: "i386-apple-macosx10.4.10"121// RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \122// RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \123// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS231 %s124// CHECK-VERSION-IOS231: "armv6k-apple-ios2.3.1"125 126// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 TVOS_DEPLOYMENT_TARGET=8.3.1 \127// RUN: %clang -target armv7-apple-darwin9 -c %s -### 2>&1 | \128// RUN: FileCheck --check-prefix=CHECK-VERSION-TVOS %s129// CHECK-VERSION-TVOS: "thumbv7-apple-tvos8.3.1"130// RUN: env TVOS_DEPLOYMENT_TARGET=8.3.1 \131// RUN: %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \132// RUN: FileCheck --check-prefix=CHECK-VERSION-TVOSSIM %s133// CHECK-VERSION-TVOSSIM: "i386-apple-tvos8.3.1-simulator"134 135// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 WATCHOS_DEPLOYMENT_TARGET=2.0 \136// RUN: %clang -target armv7-apple-darwin9 -c %s -### 2>&1 | \137// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS %s138// CHECK-VERSION-WATCHOS: "thumbv7-apple-watchos2.0.0"139// RUN: env WATCHOS_DEPLOYMENT_TARGET=2.0 \140// RUN: %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \141// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOSSIM %s142// CHECK-VERSION-WATCHOSSIM: "i386-apple-watchos2.0.0-simulator"143 144// RUN: %clang -target x86_64-apple-ios11.0.0 -c %s -### 2>&1 | \145// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS-TARGET %s146// CHECK-VERSION-IOS-TARGET: "x86_64-apple-ios11.0.0-simulator"147 148// RUN: %clang -target x86_64-apple-tvos11.0 -c %s -### 2>&1 | \149// RUN: FileCheck --check-prefix=CHECK-VERSION-TVOS-TARGET %s150// CHECK-VERSION-TVOS-TARGET: "x86_64-apple-tvos11.0.0-simulator"151 152// RUN: %clang -target x86_64-apple-watchos4.0 -c %s -### 2>&1 | \153// RUN: FileCheck --check-prefix=CHECK-VERSION-WATCHOS-TARGET %s154// CHECK-VERSION-WATCHOS-TARGET: "x86_64-apple-watchos4.0.0-simulator"155 156// RUN: env DRIVERKIT_DEPLOYMENT_TARGET=19.0 \157// RUN: %clang -target x86_64-apple-darwin -c %s -### 2>&1 | \158// RUN: FileCheck --check-prefix=CHECK-VERSION-DRIVERKIT %s159// CHECK-VERSION-DRIVERKIT: "x86_64-apple-driverkit19.0.0"160//161// Make sure stdlib is not mistaken162// RUN: env DRIVERKIT_DEPLOYMENT_TARGET=2.0 \163// RUN: not %clang -target arm64-apple-darwin -c -x c++ %s -stdlib=libc++ -### 2>&1164 165// RUN: env MACOSX_DEPLOYMENT_TARGET=1000.1000 \166// RUN: not %clang -target x86_64-apple-darwin -c %s -### 2>&1 | \167// RUN: FileCheck --check-prefix=CHECK-VERSION-INVALID-ENV %s168// CHECK-VERSION-INVALID-ENV: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=1000.1000'169 170 171 172// Target can specify the OS version:173 174// RUN: %clang -target x86_64-apple-macos10.11.2 -c %s -### 2>&1 | \175// RUN: FileCheck --check-prefix=CHECK-VERSION-TMAC2 %s176// CHECK-VERSION-TMAC2: "x86_64-apple-macosx10.11.2"177 178// RUN: %clang -target arm64-apple-ios11.1 -c %s -### 2>&1 | \179// RUN: FileCheck --check-prefix=CHECK-VERSION-TIOS1 %s180// CHECK-VERSION-TIOS1: "arm64-apple-ios11.1.0"181 182// RUN: %clang -target arm64-apple-tvos10.3 -c %s -### 2>&1 | \183// RUN: FileCheck --check-prefix=CHECK-VERSION-TTVOS1 %s184// CHECK-VERSION-TTVOS1: "arm64-apple-tvos10.3.0"185 186// RUN: %clang -target armv7k-apple-watchos4.1 -c %s -### 2>&1 | \187// RUN: FileCheck --check-prefix=CHECK-VERSION-TWATCHOS1 %s188// CHECK-VERSION-TWATCHOS1: "thumbv7k-apple-watchos4.1.0"189 190// "darwin" always back to the -m<os>version-min and environment:191 192// RUN: %clang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \193// RUN: FileCheck --check-prefix=CHECK-VERSION-TDARWIN-FALL1 %s194// CHECK-VERSION-TDARWIN-FALL1: "x86_64-apple-macosx10.10.0"195 196// RUN: %clang -target x86_64-apple-darwin14 -miphoneos-version-min=10.1 -c %s -### 2>&1 | \197// RUN: FileCheck --check-prefix=CHECK-VERSION-TDARWIN-FALL2 %s198// CHECK-VERSION-TDARWIN-FALL2: "x86_64-apple-ios10.1.0-simulator"199 200// RUN: env IPHONEOS_DEPLOYMENT_TARGET=9.1 \201// RUN: %clang -target arm64-apple-darwin14 -c %s -### 2>&1 | \202// RUN: FileCheck --check-prefix=CHECK-VERSION-TDARWIN-FALL3 %s203// CHECK-VERSION-TDARWIN-FALL3: "arm64-apple-ios9.1.0"204 205// RUN: %clang -target arm64-apple-darwin14 -isysroot SDKs/iPhoneOS11.0.sdk -c %s -### 2>&1 | \206// RUN: FileCheck --check-prefix=CHECK-VERSION-TDARWIN-FALL4 %s207// CHECK-VERSION-TDARWIN-FALL4: "arm64-apple-ios11.0.0"208 209// RUN: %clang -target unknown-apple-darwin12 -arch armv7 -c %s -### 2>&1 | \210// RUN: FileCheck --check-prefix=CHECK-VERSION-TDARWIN-FALL5 %s211// CHECK-VERSION-TDARWIN-FALL5: "thumbv7-apple-ios5.0.0"212 213// Warn about -m<os>-version-min when it's used with target:214 215// RUN: %clang -target x86_64-apple-macos10.11.2 -mmacos-version-min=10.6 -c %s -### 2>&1 | \216// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s217// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2'218 219// RUN: %clang -target x86_64-apple-macos -miphoneos-version-min=9.1 -c %s -### 2>&1 | \220// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV2 %s221// CHECK-VERSION-TNO-OSV2: overriding '-miphoneos-version-min=9.1' option with '-target x86_64-apple-macos'222 223// RUN: %clang -target x86_64-apple-ios -miphonesimulator-version-min=10.0 -c %s -### 2>&1 | \224// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV3 %s225// CHECK-VERSION-TNO-OSV3: "x86_64-apple-ios10.0.0-simulator"226// CHECK-VERSION-TNO-OSV3-NOT: overriding '-mios-simulator-version-min227// CHECK-VERSION-TNO-OSV3-NOT: argument unused during compilation228 229// RUN: %clang -target arm64-apple-ios10.1.0 -miphoneos-version-min=10.1.0.1 -c %s -### 2>&1 | \230// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV4 %s231// CHECK-VERSION-TNO-OSV4: overriding '-miphoneos-version-min=10.1.0.1' option with '-target arm64-apple-ios10.1.0'232 233// RUN: %clang -target x86_64-apple-macos10.6 -mmacos-version-min=10.6 -c %s -### 2>&1 | \234// RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-SAME %s235// CHECK-VERSION-TNO-SAME-NOT: overriding236// CHECK-VERSION-TNO-SAME-NOT: argument unused during compilation237 238// Target with OS version is not overridden by -m<os>-version-min variables:239 240// RUN: %clang -target x86_64-apple-macos10.11.2 -mmacos-version-min=10.6 -c %s -### 2>&1 | \241// RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV1 %s242// CHECK-VERSION-TIGNORE-OSV1: "x86_64-apple-macosx10.11.2"243 244// RUN: %clang -target arm64-apple-ios11.0 -mios-version-min=9.0 -c %s -### 2>&1 | \245// RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV2 %s246// CHECK-VERSION-TIGNORE-OSV2: "arm64-apple-ios11.0.0"247 248// RUN: %clang -target arm64-apple-tvos11.0 -mtvos-version-min=9.0 -c %s -### 2>&1 | \249// RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV3 %s250// CHECK-VERSION-TIGNORE-OSV3: "arm64-apple-tvos11.0.0"251 252// RUN: %clang -target armv7k-apple-watchos3 -mwatchos-version-min=4 -c %s -### 2>&1 | \253// RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV4 %s254// CHECK-VERSION-TIGNORE-OSV4: "thumbv7k-apple-watchos3.0.0"255 256// Target without OS version includes the OS given by -m<os>-version-min arguments:257 258// RUN: %clang -target x86_64-apple-macos -mmacos-version-min=10.11 -c %s -### 2>&1 | \259// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG1 %s260// CHECK-VERSION-USE-OS-ARG1: "x86_64-apple-macosx10.11.0"261 262// RUN: %clang -target arm64-apple-ios -mios-version-min=9.0 -c %s -### 2>&1 | \263// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG2 %s264// CHECK-VERSION-USE-OS-ARG2: "arm64-apple-ios9.0.0"265 266// RUN: %clang -target arm64-apple-tvos -mtvos-version-min=10.0 -c %s -### 2>&1 | \267// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG3 %s268// CHECK-VERSION-USE-OS-ARG3: "arm64-apple-tvos10.0.0"269 270// RUN: %clang -target armv7k-apple-watchos -mwatchos-version-min=4 -c %s -### 2>&1 | \271// RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG4 %s272// CHECK-VERSION-USE-OS-ARG4: "thumbv7k-apple-watchos4.0.0"273 274// Target with OS version is not overridden by environment variables:275 276// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 \277// RUN: %clang -target i386-apple-macos10.5 -c %s -### 2>&1 | \278// RUN: FileCheck --check-prefix=CHECK-VERSION-TMACOS-CMD %s279// CHECK-VERSION-TMACOS-CMD: "i386-apple-macosx10.5.0"280 281// RUN: env IPHONEOS_DEPLOYMENT_TARGET=10.1 \282// RUN: %clang -target arm64-apple-ios11 -c %s -### 2>&1 | \283// RUN: FileCheck --check-prefix=CHECK-VERSION-TIOS-CMD %s284// CHECK-VERSION-TIOS-CMD: "arm64-apple-ios11.0.0"285 286// RUN: env TVOS_DEPLOYMENT_TARGET=8.3.1 \287// RUN: %clang -target arm64-apple-tvos9 -c %s -### 2>&1 | \288// RUN: FileCheck --check-prefix=CHECK-VERSION-TTVOS-CMD %s289// CHECK-VERSION-TTVOS-CMD: "arm64-apple-tvos9.0.0"290 291// RUN: env WATCHOS_DEPLOYMENT_TARGET=2 \292// RUN: %clang -target armv7k-apple-watchos3 -c %s -### 2>&1 | \293// RUN: FileCheck --check-prefix=CHECK-VERSION-TWATCHOS-CMD %s294// CHECK-VERSION-TWATCHOS-CMD: "thumbv7k-apple-watchos3.0.0"295 296// Target with OS version is not overridden by the SDK:297 298// RUN: %clang -target armv7-apple-ios9 -Wno-missing-sysroot -isysroot SDKs/iPhoneOS11.0.sdk -c -### %s 2>&1 | \299// RUN: FileCheck --check-prefix=CHECK-VERSION-TIOS-SDK %s300// CHECK-VERSION-TIOS-SDK: thumbv7-apple-ios9301 302// RUN: %clang -target armv7k-apple-watchos4 -Wno-missing-sysroot -isysroot SDKs/WatchOS3.0.sdk -c -### %s 2>&1 | \303// RUN: FileCheck --check-prefix=CHECK-VERSION-TWATCHOS-SDK %s304// CHECK-VERSION-TWATCHOS-SDK: thumbv7k-apple-watchos4305 306// RUN: %clang -target armv7-apple-tvos9 -Wno-missing-sysroot -isysroot SDKs/AppleTVOS11.0.sdk -c -### %s 2>&1 | \307// RUN: FileCheck --check-prefix=CHECK-VERSION-TTVOS-SDK %s308// CHECK-VERSION-TTVOS-SDK: thumbv7-apple-tvos9309 310// Target with OS version is not overridden by arch:311 312// RUN: %clang -target uknown-apple-macos10.11.2 -c %s -### 2>&1 | \313// RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-ARCH1 %s314// CHECK-VERSION-TIGNORE-ARCH1: "unknown-apple-macosx10.11.2"315 316// Target can be used to specify the environment:317 318// RUN: %clang -target x86_64-apple-ios11-simulator -c %s -### 2>&1 | \319// RUN: FileCheck --check-prefix=CHECK-VERSION-TENV-SIM1 %s320// CHECK-VERSION-TENV-SIM1: "x86_64-apple-ios11.0.0-simulator"321 322// RUN: %clang -target armv7k-apple-ios10.1-simulator -c %s -### 2>&1 | \323// RUN: FileCheck --check-prefix=CHECK-VERSION-TENV-SIM2 %s324// CHECK-VERSION-TENV-SIM2: "thumbv7k-apple-ios10.1.0-simulator"325 326 327// RUN: %clang -target x86_64-apple-macos11 -c %s -### 2>&1 | \328// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s329// RUN: %clang -target x86_64-apple-darwin20 -c %s -### 2>&1 | \330// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s331// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=11 -c %s -### 2>&1 | \332// RUN: FileCheck --check-prefix=CHECK-MACOS11 %s333// CHECK-MACOS11: "x86_64-apple-macosx11.0.0"334 335// RUN: %clang -target arm64-apple-macosx10.16 -c %s -### 2>&1 | \336// RUN: FileCheck --check-prefix=CHECK-IMPLICIT-MACOS11 %s337// CHECK-IMPLICIT-MACOS11: warning: overriding deployment version338// CHECK-IMPLICIT-MACOS11: "arm64-apple-macosx11.0.0"339 340// RUN: %clang -target arm64-apple-macos999 -c %s -### 2>&1 | \341// RUN: FileCheck --check-prefix=CHECK-MACOS999 %s342 343// CHECK-MACOS999: "arm64-apple-macosx999.0.0"344 345// RUN: %clang -target arm64-apple-watchos99 -c %s -### 2>&1 | \346// RUN: FileCheck --check-prefix=CHECK-WATCHOS99 %s347 348// CHECK-WATCHOS99: "arm64-apple-watchos99.0.0"349 350// RUN: not %clang -target arm64-apple-ios999999 -c %s 2>&1 | \351// RUN: FileCheck --check-prefix=CHECK-IOS999999 %s352 353// CHECK-IOS999999: error: invalid version number in '-target arm64-apple-ios999999'354