1 // RUN: %clang -mtargetos=macos11 -arch arm64 -arch x86_64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=MACOS %s 2 // RUN: %clang -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=IOS %s 3 // RUN: %clang -mtargetos=ios14-simulator -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=IOS_SIM %s 4 // RUN: %clang -mtargetos=ios14-macabi -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=MACCATALYST %s 5 // RUN: %clang -mtargetos=tvos14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=TVOS %s 6 // RUN: %clang -mtargetos=watchos7.1 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=WATCHOS %s 7 // RUN: %clang -mtargetos=visionos1 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=VISIONOS %s 8 9 // RUN: not %clang -target arm64-apple-ios14 -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX1 %s 10 // RUN: not %clang -mtargetos=ios14 -arch arm64 -miphoneos-version-min=14 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX2 %s 11 // RUN: not %clang -mtargetos=darwin20 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=INVALIDOS %s 12 // RUN: not %clang -mtargetos=ios -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOVERSION %s 13 14 // REQUIRES: system-darwin 15 16 // MACOS: "-cc1" "-triple" "arm64-apple-macosx11.0.0" 17 // MACOS-NEXT: "-cc1" "-triple" "x86_64-apple-macosx11.0.0" 18 // IOS: "-cc1" "-triple" "arm64-apple-ios14.0.0" 19 // IOS_SIM: "-cc1" "-triple" "arm64-apple-ios14.0.0-simulator" 20 // MACCATALYST: "-cc1" "-triple" "arm64-apple-ios14.0.0-macabi" 21 // TVOS: "-cc1" "-triple" "arm64-apple-tvos14.0.0" 22 // WATCHOS: "-cc1" "-triple" "arm64-apple-watchos7.1.0" 23 // VISIONOS: "-cc1" "-triple" "arm64-apple-xros1.0.0" 24 25 // NOMIX1: error: cannot specify '-mtargetos=ios14' along with '-target arm64-apple-ios14' 26 // NOMIX2: error: cannot specify '-miphoneos-version-min=14' along with '-mtargetos=ios14' 27 // INVALIDOS: error: invalid OS value 'darwin20' in '-mtargetos=darwin20' 28 // NOVERSION: error: invalid version number in '-mtargetos=ios' 29