blob: a7cda19bcb3fe76ce45c7a7d332c7c62480a47e4 [file] [log] [blame]
Daniel Dunbar9d070312009-03-17 23:39:24 +00001// Basic binding.
Sebastian Pop9ec60df2012-01-20 22:01:23 +00002// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00003// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t
4// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t
5// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +00006
Sebastian Pop9ec60df2012-01-20 22:01:23 +00007// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00008// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: ".*\.s"' %t
9// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t
10// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +000011
Sebastian Pop9ec60df2012-01-20 22:01:23 +000012// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000013// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t
14// RUN: grep '"gcc::Compile", inputs: \[".*\.i"\], output: ".*\.s"' %t
15// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t
16// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +000017
Sebastian Pop9ec60df2012-01-20 22:01:23 +000018// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000019// RUN: grep '"gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*bindings.c.gch' %t
Daniel Dunbar5796bf42009-03-18 02:00:31 +000020
Daniel Dunbar9d070312009-03-17 23:39:24 +000021// Clang control options
22
Sebastian Pop9ec60df2012-01-20 22:01:23 +000023// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000024// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000025// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000026// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000027// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000028// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000029// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000030// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000031// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000032// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t
33// RUN: grep '"clang", inputs: \[".*\.i"\], output: (nothing)' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000034// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000035// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000036// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000037// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +000038
Sebastian Pop9ec60df2012-01-20 22:01:23 +000039// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000040// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Sebastian Pop9ec60df2012-01-20 22:01:23 +000041// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000042// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar0f99d2e2009-03-24 19:02:31 +000043
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000044// Darwin bindings
Sebastian Pop9ec60df2012-01-20 22:01:23 +000045// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000046// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t
47// RUN: grep '"darwin::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t
48// RUN: grep '"darwin::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000049