blob: 01382a198ddcf79823da1c822c625fa038c83659 [file] [log] [blame]
Daniel Dunbar9d070312009-03-17 23:39:24 +00001// Basic binding.
2// RUN: clang-driver -ccc-print-bindings %s &> %t &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +00003// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t &&
4// RUN: grep 'bind - "gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t &&
5// RUN: grep 'bind - "gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +00006
7// RUN: clang-driver -ccc-print-bindings -ccc-no-clang %s &> %t &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +00008// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: ".*\.s"' %t &&
9// RUN: grep 'bind - "gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t &&
10// RUN: grep 'bind - "gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000011
12// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s &> %t &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +000013// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t &&
14// RUN: grep 'bind - "gcc::Compile", inputs: \[".*\.i"\], output: ".*\.s"' %t &&
15// RUN: grep 'bind - "gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t &&
16// RUN: grep 'bind - "gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000017
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 &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +000021// RUN: grep 'bind - "gcc::Assemble", inputs: \[(pipe)\], output: ".*\.o"' %t &&
22// RUN: grep 'bind - "gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000023
Daniel Dunbar5796bf42009-03-18 02:00:31 +000024// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -x c-header %s &> %t &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +000025// RUN: grep 'bind - "gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*bindings.c.gch' %t &&
Daniel Dunbar5796bf42009-03-18 02:00:31 +000026
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 &&
Daniel Dunbarddf4d782009-03-18 21:17:39 +000036// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.ii"' %t &&
37// RUN: grep 'bind - "clang", inputs: \[".*\.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