blob: 814642128432462bf3a8344ef78cf34b1e039928 [file] [log] [blame]
Daniel Dunbar0071da92009-03-17 23:39:24 +00001// Basic binding.
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +00002// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK01
3// CHECK01: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
4// CHECK01: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
5// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
Daniel Dunbar0071da92009-03-17 23:39:24 +00006
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +00007// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2>&1 | FileCheck %s --check-prefix=CHECK02
8// CHECK02: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
9// CHECK02: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
10// CHECK02: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
Daniel Dunbar0071da92009-03-17 23:39:24 +000011
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000012// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK03
13// CHECK03: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
14// CHECK03: "gcc::Compile", inputs: ["{{.*}}.i"], output: "{{.*}}.s"
15// CHECK03: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
16// CHECK03: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
Daniel Dunbar0071da92009-03-17 23:39:24 +000017
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000018// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2>&1 | FileCheck %s --check-prefix=CHECK04
19// CHECK04: "gcc::Precompile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}bindings.c.gch
Daniel Dunbard00978b2009-03-18 02:00:31 +000020
Daniel Dunbar0071da92009-03-17 23:39:24 +000021// Clang control options
22
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000023// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK05
24// CHECK05: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)
Daniel Dunbar0071da92009-03-17 23:39:24 +000025
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000026// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK06
27// CHECK06: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing)
28
29// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK07
30// CHECK07: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing)
31
32// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08
33// CHECK08: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)
34
35// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK09
36// CHECK09: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
37// CHECK09: "clang", inputs: ["{{.*}}.i"], output: (nothing)
38
39// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2>&1 | FileCheck %s --check-prefix=CHECK10
40// CHECK10: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
41
42// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2>&1 | FileCheck %s --check-prefix=CHECK11
43// CHECK11: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
44
45// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2>&1 | FileCheck %s --check-prefix=CHECK12
46// CHECK12: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
47
48// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2>&1 | FileCheck %s --check-prefix=CHECK13
49// CHECK13: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
Daniel Dunbar88f356e2009-03-24 19:02:31 +000050
Daniel Dunbarbe220842009-03-20 16:06:39 +000051// Darwin bindings
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000052// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK14
53// CHECK14: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
54// CHECK14: "darwin::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
55// CHECK14: "darwin::Link", inputs: ["{{.*}}.o"], output: "a.out"