blob: 0e5623f0b81ca014d3e36b02d3a9db05ccccd596 [file] [log] [blame]
Daniel Dunbar9d070312009-03-17 23:39:24 +00001// Basic binding.
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +00002// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings %s 2> %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
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +00007// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2> %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
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000012// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2> %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
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000018// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000019// 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 Dunbar7ec3daf2009-03-24 03:07:05 +000024// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %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
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000029// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000030// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000031// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000032// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000033// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000034// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000035// RUN: clang -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp -x c++ %s 2> %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 Dunbar7ec3daf2009-03-24 03:07:05 +000038// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t &&
Daniel Dunbard46f0ac2009-03-18 00:12:31 +000039// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t &&
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000040// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs ppc %s -S -arch ppc 2> %t &&
Daniel Dunbard46f0ac2009-03-18 00:12:31 +000041// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t &&
Daniel Dunbar9d070312009-03-17 23:39:24 +000042
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000043// Darwin bindings
Daniel Dunbar7ec3daf2009-03-24 03:07:05 +000044// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings %s 2> %t &&
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000045// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t &&
46// RUN: grep 'bind - "darwin::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t &&
47// RUN: grep 'bind - "gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t &&
48
Daniel Dunbar9d070312009-03-17 23:39:24 +000049// RUN: true