1 // Check non-fragile ABI and dispatch method defaults.
5 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
6 // RUN: -arch i386 -mmacos-version-min=10.5 2> %t
7 // RUN: FileCheck --check-prefix CHECK-CHECK-I386_OSX10_5 < %t %s
9 // CHECK-CHECK-I386_OSX10_5: "-cc1"
10 // CHECK-CHECK-I386_OSX10_5: -fobjc-runtime=macosx-fragile-10.5
11 // CHECK-CHECK-I386_OSX10_5-NOT: -fobjc-dispatch-method
12 // CHECK-CHECK-I386_OSX10_5: darwin-objc-defaults
14 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
15 // RUN: -arch i386 -mmacos-version-min=10.6 2> %t
16 // RUN: FileCheck --check-prefix CHECK-CHECK-I386_OSX10_6 < %t %s
18 // CHECK-CHECK-I386_OSX10_6: "-cc1"
19 // CHECK-CHECK-I386_OSX10_6: -fobjc-runtime=macosx-fragile-10.6
20 // CHECK-CHECK-I386_OSX10_6-NOT: -fobjc-dispatch-method
21 // CHECK-CHECK-I386_OSX10_6: darwin-objc-defaults
23 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
24 // RUN: -arch i386 -miphoneos-version-min=3.0 2> %t
25 // RUN: FileCheck --check-prefix CHECK-CHECK-I386_IPHONE3_0 < %t %s
27 // CHECK-CHECK-I386_IPHONE3_0: "-cc1"
28 // CHECK-CHECK-I386_IPHONE3_0: -fobjc-runtime=ios-3.0
29 // CHECK-CHECK-I386_IPHONE3_0-NOT: -fobjc-dispatch-method
30 // CHECK-CHECK-I386_IPHONE3_0: darwin-objc-defaults
34 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
35 // RUN: -arch x86_64 -mmacos-version-min=10.4 2> %t
36 // RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_4 < %t %s
38 // CHECK-CHECK-X86_64_OSX10_4: "-cc1"
39 // CHECK-CHECK-X86_64_OSX10_4: -fobjc-dispatch-method=non-legacy
41 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
42 // RUN: -arch x86_64 -mmacos-version-min=10.5 2> %t
43 // RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_5 < %t %s
46 // CHECK-CHECK-X86_64_OSX10_5: "-cc1"
47 // CHECK-CHECK-X86_64_OSX10_5: -fobjc-runtime=macosx-10.5
48 // CHECK-CHECK-X86_64_OSX10_5: -fobjc-dispatch-method=non-legacy
49 // CHECK-CHECK-X86_64_OSX10_5: darwin-objc-defaults
51 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
52 // RUN: -arch x86_64 -mmacos-version-min=10.6 2> %t
53 // RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_6 < %t %s
55 // CHECK-CHECK-X86_64_OSX10_6: "-cc1"
56 // CHECK-CHECK-X86_64_OSX10_6: -fobjc-runtime=macosx-10.6
57 // CHECK-CHECK-X86_64_OSX10_6: darwin-objc-defaults
59 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
60 // RUN: -arch x86_64 -miphoneos-version-min=3.0 2> %t
61 // RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_IPHONE3_0 < %t %s
63 // CHECK-CHECK-X86_64_IPHONE3_0: "-cc1"
64 // CHECK-CHECK-X86_64_IPHONE3_0: -fobjc-runtime=ios-3.0
65 // CHECK-CHECK-X86_64_IPHONE3_0: darwin-objc-defaults
69 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
70 // RUN: -arch armv7 -mmacos-version-min=10.5 2> %t
71 // RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_5 < %t %s
73 // CHECK-CHECK-ARMV7_OSX10_5: "-cc1"
74 // CHECK-CHECK-ARMV7_OSX10_5: -fobjc-runtime=macosx-10.5
75 // CHECK-CHECK-ARMV7_OSX10_5-NOT: -fobjc-dispatch-method
76 // CHECK-CHECK-ARMV7_OSX10_5: darwin-objc-defaults
78 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
79 // RUN: -arch armv7 -mmacos-version-min=10.6 2> %t
80 // RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_6 < %t %s
82 // CHECK-CHECK-ARMV7_OSX10_6: "-cc1"
83 // CHECK-CHECK-ARMV7_OSX10_6: -fobjc-runtime=macosx-10.6
84 // CHECK-CHECK-ARMV7_OSX10_6-NOT: -fobjc-dispatch-method
85 // CHECK-CHECK-ARMV7_OSX10_6: darwin-objc-defaults
87 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
88 // RUN: -arch armv7 -miphoneos-version-min=3.0 2> %t
89 // RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_IPHONE3_0 < %t %s
91 // CHECK-CHECK-ARMV7_IPHONE3_0: "-cc1"
92 // CHECK-CHECK-ARMV7_IPHONE3_0: -fobjc-runtime=ios-3.0
93 // CHECK-CHECK-ARMV7_IPHONE3_0-NOT: -fobjc-dispatch-method
94 // CHECK-CHECK-ARMV7_IPHONE3_0: darwin-objc-defaults
96 // RUN: %clang -target x86_64-apple-ios13.1-macabi -S -### %s 2> %t
97 // RUN: FileCheck --check-prefix CHECK-CHECK-MACCATALYST < %t %s
99 // CHECK-CHECK-MACCATALYST: "-cc1"
100 // CHECK-CHECK-MACCATALYST: -fobjc-runtime=macosx-10.15
101 // CHECK-CHECK-MACCATALYST-NOT: -fobjc-dispatch-method
102 // CHECK-CHECK-MACCATALYST: darwin-objc-defaults