blob: 4db155a22b78dddd74cb87f93cf360ed0c0c4966 [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
Rafael Espindola84619412012-10-30 00:13:16 +000029// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000030// CHECK08: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)
31
32// 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
33// CHECK09: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
34// CHECK09: "clang", inputs: ["{{.*}}.i"], output: (nothing)
35
Rafael Espindolafc3fc0c2012-10-09 20:46:28 +000036// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings %s -S -arch ppc 2>&1 | FileCheck %s --check-prefix=CHECK11
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000037// CHECK11: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
38
Rafael Espindolafc3fc0c2012-10-09 20:46:28 +000039// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings %s -S 2>&1 | FileCheck %s --check-prefix=CHECK12
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000040// CHECK12: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"
41
Daniel Dunbarbe220842009-03-20 16:06:39 +000042// Darwin bindings
Rafael Espindolaea0c5ec2012-10-02 17:41:03 +000043// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK14
44// CHECK14: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
45// CHECK14: "darwin::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
46// CHECK14: "darwin::Link", inputs: ["{{.*}}.o"], output: "a.out"