blob: db7a0809908307815051ee6cc4af844b6ae64275 [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 Rosierd372a702012-10-09 19:43:33 +000021// RUN: -Wno-int-conversion -Wconstant-conversion -Wenum-conversion \
Chad Rosier285f9a22011-08-17 18:24:55 +000022// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
23// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED < %t %s
24
25// CHECK-UNSUPPORTED: cc1plus"
26// CHECK-UNSUPPORTED-NOT: "-Wno-self-assign"
David Blaikie5f31f082011-10-18 05:54:07 +000027// CHECK-UNSUPPORTED-NOT: "-Wc++11-extensions"
Chad Rosier04225c12011-08-18 01:18:28 +000028// CHECK-UNSUPPORTED-NOT: "-Wno-microsoft"
29// CHECK-UNSUPPORTED-NOT: "-Wmicrosoft"
Chad Rosier80717972011-08-26 18:30:43 +000030// CHECK-UNSUPPORTED-NOT: "-Wvla"
31// CHECK-UNSUPPORTED-NOT: "-faltivec"
32// CHECK-UNSUPPORTED-NOT: "-mthumb"
33// CHECK-UNSUPPORTED-NOT: "-mlongcall"
34// CHECK-UNSUPPORTED: "-mno-longcall"
35// CHECK-UNSUPPORTED: "-msoft-float"
Chad Rosierd372a702012-10-09 19:43:33 +000036// CHECK-UNSUPPORTED-NOT: "-Wno-int-conversion"
37// CHECK-UNSUPPORTED-NOT: "-Wconstant-conversion"
38// CHECK-UNSUPPORTED-NOT: "-Wenum-conversion"
Chad Rosier80717972011-08-26 18:30:43 +000039
Sebastian Pop9ec60df2012-01-20 22:01:23 +000040// RUN: %clang -target i386-apple-darwin10 \
Chad Rosier4fe4d732011-09-08 00:38:00 +000041// RUN: -Wconstant-logical-operand -save-temps \
42// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
43// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED2 < %t %s
44
45// CHECK-UNSUPPORTED2: cc1plus"
46// CHECK-UNSUPPORTED2-NOT: "-Wconstant-logical-operand"
Bob Wilson6fb522e2012-04-04 07:06:30 +000047
Chad Rosier7ed4f662012-06-26 16:57:41 +000048// Check that -serialize-diagnostics does not cause an "argument unused" error.
49// RUN: %clang -target i386-apple-darwin10 \
50// RUN: -Wall -fapple-kext -### -serialize-diagnostics %t.dia -c %s 2>&1 | \
51// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
52
Bob Wilson6fb522e2012-04-04 07:06:30 +000053// Check that --serialize-diagnostics does not cause an "argument unused" error.
54// RUN: %clang -target i386-apple-darwin10 \
Bob Wilsone1fde1d2012-04-04 14:43:40 +000055// RUN: -Wall -fapple-kext -### --serialize-diagnostics %t.dia -c %s 2>&1 | \
Benjamin Kramerc9aa9c02012-04-04 09:05:21 +000056// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
57
58// CHECK-UNUSED-NOT: argument unused
59// CHECK-UNUSED: cc1plus