Daniel Dunbar | 5ce872f | 2011-03-18 20:14:03 +0000 | [diff] [blame] | 1 | // Check that we transparently fallback to llvm-gcc for i386 kexts, we don't |
| 2 | // support the ABI they use (yet). |
| 3 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 4 | // RUN: %clang -target i386-apple-darwin10 \ |
Daniel Dunbar | 5ce872f | 2011-03-18 20:14:03 +0000 | [diff] [blame] | 5 | // 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 Wilson | a544aee | 2011-08-13 23:48:55 +0000 | [diff] [blame] | 10 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 11 | // RUN: %clang -target i386-apple-darwin10 \ |
Bob Wilson | a544aee | 2011-08-13 23:48:55 +0000 | [diff] [blame] | 12 | // 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 Rosier | 285f9a2 | 2011-08-17 18:24:55 +0000 | [diff] [blame] | 17 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 18 | // RUN: %clang -target i386-apple-darwin10 \ |
David Blaikie | 5f31f08 | 2011-10-18 05:54:07 +0000 | [diff] [blame] | 19 | // RUN: -Wno-self-assign -Wc++11-extensions -Wno-microsoft -Wmicrosoft -Wvla \ |
Chad Rosier | 8071797 | 2011-08-26 18:30:43 +0000 | [diff] [blame] | 20 | // RUN: -faltivec -mthumb -mcpu=G4 -mlongcall -mno-longcall -msoft-float \ |
Chad Rosier | d372a70 | 2012-10-09 19:43:33 +0000 | [diff] [blame] | 21 | // RUN: -Wno-int-conversion -Wconstant-conversion -Wenum-conversion \ |
Chad Rosier | 285f9a2 | 2011-08-17 18:24:55 +0000 | [diff] [blame] | 22 | // 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 Blaikie | 5f31f08 | 2011-10-18 05:54:07 +0000 | [diff] [blame] | 27 | // CHECK-UNSUPPORTED-NOT: "-Wc++11-extensions" |
Chad Rosier | 04225c1 | 2011-08-18 01:18:28 +0000 | [diff] [blame] | 28 | // CHECK-UNSUPPORTED-NOT: "-Wno-microsoft" |
| 29 | // CHECK-UNSUPPORTED-NOT: "-Wmicrosoft" |
Chad Rosier | 8071797 | 2011-08-26 18:30:43 +0000 | [diff] [blame] | 30 | // 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 Rosier | d372a70 | 2012-10-09 19:43:33 +0000 | [diff] [blame] | 36 | // CHECK-UNSUPPORTED-NOT: "-Wno-int-conversion" |
| 37 | // CHECK-UNSUPPORTED-NOT: "-Wconstant-conversion" |
| 38 | // CHECK-UNSUPPORTED-NOT: "-Wenum-conversion" |
Chad Rosier | 8071797 | 2011-08-26 18:30:43 +0000 | [diff] [blame] | 39 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 40 | // RUN: %clang -target i386-apple-darwin10 \ |
Chad Rosier | 4fe4d73 | 2011-09-08 00:38:00 +0000 | [diff] [blame] | 41 | // 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 Wilson | 6fb522e | 2012-04-04 07:06:30 +0000 | [diff] [blame] | 47 | |
Chad Rosier | 7ed4f66 | 2012-06-26 16:57:41 +0000 | [diff] [blame] | 48 | // 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 Wilson | 6fb522e | 2012-04-04 07:06:30 +0000 | [diff] [blame] | 53 | // Check that --serialize-diagnostics does not cause an "argument unused" error. |
| 54 | // RUN: %clang -target i386-apple-darwin10 \ |
Bob Wilson | e1fde1d | 2012-04-04 14:43:40 +0000 | [diff] [blame] | 55 | // RUN: -Wall -fapple-kext -### --serialize-diagnostics %t.dia -c %s 2>&1 | \ |
Benjamin Kramer | c9aa9c0 | 2012-04-04 09:05:21 +0000 | [diff] [blame] | 56 | // RUN: FileCheck --check-prefix=CHECK-UNUSED %s |
| 57 | |
| 58 | // CHECK-UNUSED-NOT: argument unused |
| 59 | // CHECK-UNUSED: cc1plus |