summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/bindings.c
blob: 4db155a22b78dddd74cb87f93cf360ed0c0c4966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Basic binding.
// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK01
// CHECK01: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
// CHECK01: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2>&1 | FileCheck %s --check-prefix=CHECK02
// CHECK02: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
// CHECK02: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK02: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK03
// CHECK03: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
// CHECK03: "gcc::Compile", inputs: ["{{.*}}.i"], output: "{{.*}}.s"
// CHECK03: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK03: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2>&1 | FileCheck %s --check-prefix=CHECK04
// CHECK04: "gcc::Precompile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}bindings.c.gch

// Clang control options

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK05
// CHECK05: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK06
// CHECK06: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing)

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08
// CHECK08: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)

// 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
// CHECK09: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
// CHECK09: "clang", inputs: ["{{.*}}.i"], output: (nothing)

// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings %s -S -arch ppc 2>&1 | FileCheck %s --check-prefix=CHECK11
// CHECK11: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"

// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings %s -S 2>&1 | FileCheck %s --check-prefix=CHECK12
// CHECK12: "clang", inputs: ["{{.*}}bindings.c"], output: "bindings.s"

// Darwin bindings
// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK14
// CHECK14: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
// CHECK14: "darwin::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK14: "darwin::Link", inputs: ["{{.*}}.o"], output: "a.out"
OpenPOWER on IntegriCloud