• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
2 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX %s
3 // CHECK-VERSION-OSX: "armv6k-apple-macosx10.5.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 %s
6 // 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 %s
9 // 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 %s
12 // CHECK-VERSION-IOS3: "armv6k-apple-ios3.0.0"
13 // RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \
14 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
15 // RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -c %s -### 2>&1 | \
16 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
17 // CHECK-VERSION-OSX4: "i386-apple-macosx10.4.0"
18 // RUN: %clang -target i686-apple-darwin9 -c %s -### 2>&1 | \
19 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
20 // RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.5 -c %s -### 2>&1 | \
21 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
22 // CHECK-VERSION-OSX5: "i386-apple-macosx10.5.0"
23 // RUN: %clang -target i686-apple-darwin10 -c %s -### 2>&1 | \
24 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
25 // RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.6 -c %s -### 2>&1 | \
26 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
27 // CHECK-VERSION-OSX6: "i386-apple-macosx10.6.0"
28 // RUN: %clang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \
29 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
30 // RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min=10.10 -c %s -### 2>&1 | \
31 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
32 // CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"
33 // RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min= -c %s -### 2>&1 | \
34 // RUN:   FileCheck --check-prefix=CHECK-VERSION-MISSING %s
35 // CHECK-VERSION-MISSING: invalid version number
36 // RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \
37 // RUN:   FileCheck --check-prefix=CHECK-VERSION-WATCHOS20 %s
38 // RUN: %clang -target armv7-apple-darwin -mtvos-version-min=8.3 -c %s -### 2>&1 | \
39 // RUN:   FileCheck --check-prefix=CHECK-VERSION-TVOS83 %s
40 // CHECK-VERSION-TVOS83: "thumbv7-apple-tvos8.3.0"
41 // RUN: %clang -target i386-apple-darwin -mtvos-simulator-version-min=8.3 -c %s -### 2>&1 | \
42 // RUN:   FileCheck --check-prefix=CHECK-VERSION-TVSIM83 %s
43 // CHECK-VERSION-TVSIM83: "i386-apple-tvos8.3.0"
44 // RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \
45 // RUN:   FileCheck --check-prefix=CHECK-VERSION-WATCHOS20 %s
46 // CHECK-VERSION-WATCHOS20: "thumbv7k-apple-watchos2.0.0"
47 // RUN: %clang -target i386-apple-darwin -mwatchos-simulator-version-min=2.0 -c %s -### 2>&1 | \
48 // RUN:   FileCheck --check-prefix=CHECK-VERSION-WATCHSIM20 %s
49 // CHECK-VERSION-WATCHSIM20: "i386-apple-watchos2.0.0"
50 
51 // Check environment variable gets interpreted correctly
52 // RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 IPHONEOS_DEPLOYMENT_TARGET=2.0 \
53 // RUN:   %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \
54 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
55 // RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 IPHONEOS_DEPLOYMENT_TARGET=2.0 \
56 // RUN:   %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
57 // RUN:   FileCheck --check-prefix=CHECK-VERSION-IOS2 %s
58 
59 // RUN: env MACOSX_DEPLOYMENT_TARGET=10.4.10 \
60 // RUN:   %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \
61 // RUN:   FileCheck --check-prefix=CHECK-VERSION-OSX49 %s
62 // CHECK-VERSION-OSX49: "i386-apple-macosx10.4.10"
63 // RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \
64 // RUN:   %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \
65 // RUN:   FileCheck --check-prefix=CHECK-VERSION-IOS231 %s
66 // CHECK-VERSION-IOS231: "armv6k-apple-ios2.3.1"
67 
68 // RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 TVOS_DEPLOYMENT_TARGET=8.3.1 \
69 // RUN:   %clang -target armv7-apple-darwin9 -c %s -### 2>&1 | \
70 // RUN:   FileCheck --check-prefix=CHECK-VERSION-TVOS %s
71 // CHECK-VERSION-TVOS: "thumbv7-apple-tvos8.3.1"
72 // RUN: env TVOS_DEPLOYMENT_TARGET=8.3.1 \
73 // RUN:   %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \
74 // RUN:   FileCheck --check-prefix=CHECK-VERSION-TVOSSIM %s
75 // CHECK-VERSION-TVOSSIM: "i386-apple-tvos8.3.1"
76 
77 // RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 WATCHOS_DEPLOYMENT_TARGET=2.0 \
78 // RUN:   %clang -target armv7-apple-darwin9 -c %s -### 2>&1 | \
79 // RUN:   FileCheck --check-prefix=CHECK-VERSION-WATCHOS %s
80 // CHECK-VERSION-WATCHOS: "thumbv7-apple-watchos2.0.0"
81 // RUN: env WATCHOS_DEPLOYMENT_TARGET=2.0 \
82 // RUN:   %clang -target i386-apple-darwin9 -c %s -### 2>&1 | \
83 // RUN:   FileCheck --check-prefix=CHECK-VERSION-WATCHOSSIM %s
84 // CHECK-VERSION-WATCHOSSIM: "i386-apple-watchos2.0.0"
85