blob: eb9f9578e9cb74cf3f5db5a80cc54998ddfd858b [file] [log] [blame]
Daniel Dunbar5ce872f2011-03-18 20:14:03 +00001// Check that we transparently fallback to llvm-gcc for i386 kexts, we don't
2// support the ABI they use (yet).
3
Sebastian Pop9ec60df2012-01-20 22:01:23 +00004// RUN: %clang -target i386-apple-darwin10 \
Daniel Dunbar5ce872f2011-03-18 20:14:03 +00005// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
6// RUN: FileCheck --check-prefix=CHECK < %t %s
7
8// CHECK: cc1plus"
9// CHECK: "-fapple-kext"
Bob Wilsona544aee2011-08-13 23:48:55 +000010
Sebastian Pop9ec60df2012-01-20 22:01:23 +000011// RUN: %clang -target i386-apple-darwin10 \
Bob Wilsona544aee2011-08-13 23:48:55 +000012// RUN: -mkernel -### -fsyntax-only %s 2> %t
13// RUN: FileCheck --check-prefix=CHECK-MKERNEL < %t %s
14
15// CHECK-MKERNEL: cc1plus"
16// CHECK-MKERNEL: "-mkernel"
Chad Rosier285f9a22011-08-17 18:24:55 +000017
Sebastian Pop9ec60df2012-01-20 22:01:23 +000018// RUN: %clang -target i386-apple-darwin10 \
David Blaikie5f31f082011-10-18 05:54:07 +000019// RUN: -Wno-self-assign -Wc++11-extensions -Wno-microsoft -Wmicrosoft -Wvla \
Chad Rosier80717972011-08-26 18:30:43 +000020// RUN: -faltivec -mthumb -mcpu=G4 -mlongcall -mno-longcall -msoft-float \
Chad Rosier285f9a22011-08-17 18:24:55 +000021// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
22// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED < %t %s
23
24// CHECK-UNSUPPORTED: cc1plus"
25// CHECK-UNSUPPORTED-NOT: "-Wno-self-assign"
David Blaikie5f31f082011-10-18 05:54:07 +000026// CHECK-UNSUPPORTED-NOT: "-Wc++11-extensions"
Chad Rosier04225c12011-08-18 01:18:28 +000027// CHECK-UNSUPPORTED-NOT: "-Wno-microsoft"
28// CHECK-UNSUPPORTED-NOT: "-Wmicrosoft"
Chad Rosier80717972011-08-26 18:30:43 +000029// CHECK-UNSUPPORTED-NOT: "-Wvla"
30// CHECK-UNSUPPORTED-NOT: "-faltivec"
31// CHECK-UNSUPPORTED-NOT: "-mthumb"
32// CHECK-UNSUPPORTED-NOT: "-mlongcall"
33// CHECK-UNSUPPORTED: "-mno-longcall"
34// CHECK-UNSUPPORTED: "-msoft-float"
35
Sebastian Pop9ec60df2012-01-20 22:01:23 +000036// RUN: %clang -target i386-apple-darwin10 \
Chad Rosier4fe4d732011-09-08 00:38:00 +000037// RUN: -Wconstant-logical-operand -save-temps \
38// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
39// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED2 < %t %s
40
41// CHECK-UNSUPPORTED2: cc1plus"
42// CHECK-UNSUPPORTED2-NOT: "-Wconstant-logical-operand"
Bob Wilson6fb522e2012-04-04 07:06:30 +000043
Chad Rosier7ed4f662012-06-26 16:57:41 +000044// Check that -serialize-diagnostics does not cause an "argument unused" error.
45// RUN: %clang -target i386-apple-darwin10 \
46// RUN: -Wall -fapple-kext -### -serialize-diagnostics %t.dia -c %s 2>&1 | \
47// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
48
Bob Wilson6fb522e2012-04-04 07:06:30 +000049// Check that --serialize-diagnostics does not cause an "argument unused" error.
50// RUN: %clang -target i386-apple-darwin10 \
Bob Wilsone1fde1d2012-04-04 14:43:40 +000051// RUN: -Wall -fapple-kext -### --serialize-diagnostics %t.dia -c %s 2>&1 | \
Benjamin Kramerc9aa9c02012-04-04 09:05:21 +000052// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
53
54// CHECK-UNUSED-NOT: argument unused
55// CHECK-UNUSED: cc1plus