Daniel Dunbar | 9d07031 | 2009-03-17 23:39:24 +0000 | [diff] [blame] | 1 | // Basic binding. |
| 2 | // RUN: clang-driver -ccc-print-bindings %s &> %t && |
| 3 | // RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t && |
| 4 | // RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t && |
| 5 | // RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t && |
| 6 | |
| 7 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang %s &> %t && |
| 8 | // RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t && |
| 9 | // RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t && |
| 10 | // RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t && |
| 11 | |
| 12 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s &> %t && |
| 13 | // RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.i"' %t && |
| 14 | // RUN: grep 'bind - "gcc::Compile", inputs: \["/tmp/foo.i"\], output: "/tmp/foo.s"' %t && |
| 15 | // RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t && |
| 16 | // RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t && |
| 17 | |
| 18 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s &> %t && |
| 19 | // RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t && |
| 20 | // RUN: grep 'bind - "gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t && |
| 21 | // RUN: grep 'bind - "gcc::Assemble", inputs: \[(pipe)\], output: "/tmp/foo.o"' %t && |
| 22 | // RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t && |
| 23 | |
Daniel Dunbar | 5796bf4 | 2009-03-18 02:00:31 +0000 | [diff] [blame^] | 24 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang -x c-header %s &> %t && |
| 25 | // RUN: grep 'bind - "gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*/bindings.c.gch' %t && |
| 26 | |
Daniel Dunbar | 9d07031 | 2009-03-17 23:39:24 +0000 | [diff] [blame] | 27 | // Clang control options |
| 28 | |
| 29 | // RUN: clang-driver -ccc-print-bindings -fsyntax-only %s &> %t && |
| 30 | // RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: (nothing)' %t && |
| 31 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang -fsyntax-only %s &> %t && |
| 32 | // RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t && |
| 33 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s &> %t && |
| 34 | // RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t && |
| 35 | // RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp -x c++ %s &> %t && |
| 36 | // RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.ii"' %t && |
| 37 | // RUN: grep 'bind - "clang", inputs: \["/tmp/foo.ii"\], output: (nothing)' %t && |
Daniel Dunbar | d46f0ac | 2009-03-18 00:12:31 +0000 | [diff] [blame] | 38 | // RUN: clang-driver -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc &> %t && |
| 39 | // RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t && |
| 40 | // RUN: clang-driver -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs ppc %s -S -arch ppc &> %t && |
| 41 | // RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t && |
Daniel Dunbar | 9d07031 | 2009-03-17 23:39:24 +0000 | [diff] [blame] | 42 | |
| 43 | // RUN: true |