29 lines · c
1// RUN: %clang -mtargetos=macos11 -arch arm64 -arch x86_64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=MACOS %s2// RUN: %clang -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=IOS %s3// RUN: %clang -mtargetos=ios14-simulator -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=IOS_SIM %s4// RUN: %clang -mtargetos=ios14-macabi -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=MACCATALYST %s5// RUN: %clang -mtargetos=tvos14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=TVOS %s6// RUN: %clang -mtargetos=watchos7.1 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=WATCHOS %s7// RUN: %clang -mtargetos=visionos1 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=VISIONOS %s8 9// RUN: not %clang -target arm64-apple-ios14 -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX1 %s10// RUN: not %clang -mtargetos=ios14 -arch arm64 -miphoneos-version-min=14 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX2 %s11// RUN: not %clang -mtargetos=darwin20 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=INVALIDOS %s12// RUN: not %clang -mtargetos=ios -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOVERSION %s13 14// REQUIRES: system-darwin && target={{.*}}-{{darwin|macos}}{{.*}}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