blob: 2271ab5c645917ce6be1c46d44ddffcf5f716f74 [file] [log] [blame]
Daniel Dunbar9d070312009-03-17 23:39:24 +00001// Basic binding.
Daniel Dunbar80737ad2009-12-15 22:01:24 +00002// RUN: %clang -ccc-host-triple 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
Daniel Dunbar80737ad2009-12-15 22:01:24 +00007// RUN: %clang -ccc-host-triple 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
Daniel Dunbar80737ad2009-12-15 22:01:24 +000012// RUN: %clang -ccc-host-triple 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
Daniel Dunbar80737ad2009-12-15 22:01:24 +000018// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000019// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t
20// RUN: grep '"gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t
21// RUN: grep '"gcc::Assemble", inputs: \[(pipe)\], output: ".*\.o"' %t
22// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +000023
Daniel Dunbar80737ad2009-12-15 22:01:24 +000024// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000025// RUN: grep '"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 Dunbar80737ad2009-12-15 22:01:24 +000029// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000030// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000031// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000032// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000033// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000034// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000035// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000036// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000037// RUN: %clang -ccc-host-triple 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 +000038// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t
39// RUN: grep '"clang", inputs: \[".*\.i"\], output: (nothing)' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000040// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000041// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000042// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000043// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar9d070312009-03-17 23:39:24 +000044
Daniel Dunbar80737ad2009-12-15 22:01:24 +000045// RUN: %clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000046// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000047// RUN: %clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000048// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t
Daniel Dunbar0f99d2e2009-03-24 19:02:31 +000049
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000050// Darwin bindings
Daniel Dunbar80737ad2009-12-15 22:01:24 +000051// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings %s 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000052// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t
53// RUN: grep '"darwin::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t
54// RUN: grep '"darwin::Link", inputs: \[".*\.o"\], output: "a.out"' %t
Daniel Dunbar8cac5f72009-03-20 16:06:39 +000055