blob: 73272be59d9f3c978269e5097402abd7959cdca9 [file] [log] [blame]
Daniel Dunbar9d070312009-03-17 23:39:24 +00001// 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 Dunbar5796bf42009-03-18 02:00:31 +000024// 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 Dunbar9d070312009-03-17 23:39:24 +000027// 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 Dunbard46f0ac2009-03-18 00:12:31 +000038// 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 Dunbar9d070312009-03-17 23:39:24 +000042
43// RUN: true