[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / mtargetos-darwin.c
blob39fc8753e460c2b4f38c1bc41d85e39febd2ece4
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
8 // RUN: %clang -target arm64-apple-ios14 -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX1 %s
9 // RUN: %clang -mtargetos=ios14 -arch arm64 -miphoneos-version-min=14 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX2 %s
10 // RUN: %clang -mtargetos=darwin20 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=INVALIDOS %s
11 // RUN: %clang -mtargetos=ios -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOVERSION %s
13 // REQUIRES: system-darwin
15 // MACOS: "-cc1" "-triple" "arm64-apple-macosx11.0.0"
16 // MACOS-NEXT: "-cc1" "-triple" "x86_64-apple-macosx11.0.0"
17 // IOS: "-cc1" "-triple" "arm64-apple-ios14.0.0"
18 // IOS_SIM: "-cc1" "-triple" "arm64-apple-ios14.0.0-simulator"
19 // MACCATALYST: "-cc1" "-triple" "arm64-apple-ios14.0.0-macabi"
20 // TVOS: "-cc1" "-triple" "arm64-apple-tvos14.0.0"
21 // WATCHOS: "-cc1" "-triple" "arm64-apple-watchos7.1.0"
23 // NOMIX1: error: cannot specify '-mtargetos=ios14' along with '-target arm64-apple-ios14'
24 // NOMIX2: error: cannot specify '-miphoneos-version-min=14' along with '-mtargetos=ios14'
25 // INVALIDOS: error: invalid OS value 'darwin20' in '-mtargetos=darwin20'
26 // NOVERSION: error: invalid version number in '-mtargetos=ios'