• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check that we run dsymutil properly with multiple -arch options.
2 //
3 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \
4 // RUN:   -arch i386 -arch x86_64 %s -g 2> %t
5 // RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
6 //
7 // CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-dsymutil.c", c
8 // CHECK-MULTIARCH-ACTIONS: 1: preprocessor, {0}, cpp-output
9 // CHECK-MULTIARCH-ACTIONS: 2: compiler, {1}, ir
10 // CHECK-MULTIARCH-ACTIONS: 3: backend, {2}, assembler
11 // CHECK-MULTIARCH-ACTIONS: 4: assembler, {3}, object
12 // CHECK-MULTIARCH-ACTIONS: 5: linker, {4}, image
13 // CHECK-MULTIARCH-ACTIONS: 6: bind-arch, "i386", {5}, image
14 // CHECK-MULTIARCH-ACTIONS: 7: bind-arch, "x86_64", {5}, image
15 // CHECK-MULTIARCH-ACTIONS: 8: lipo, {6, 7}, image
16 // CHECK-MULTIARCH-ACTIONS: 9: dsymutil, {8}, dSYM
17 //
18 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
19 // RUN:   -arch i386 -arch x86_64 %s -g 2> %t
20 // RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
21 //
22 // CHECK-MULTIARCH-BINDINGS: "x86_64-apple-darwin10" - "darwin::Lipo", inputs: [{{.*}}, {{.*}}], output: "a.out"
23 // CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
24 
25 // Check output name derivation.
26 //
27 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
28 // RUN:   -o foo %s -g 2> %t
29 // RUN: FileCheck -Doutfile=foo -Ddsymfile=foo.dSYM \
30 // RUN:          -check-prefix=CHECK-OUTPUT-NAME < %t %s
31 //
32 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
33 // RUN:   -o bar/foo %s -g 2> %t
34 // RUN: FileCheck -Doutfile=bar/foo -Ddsymfile=bar/foo.dSYM \
35 // RUN:           -check-prefix=CHECK-OUTPUT-NAME < %t %s
36 //
37 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
38 // RUN:   -o bar/foo -dsym-dir external %s -g 2> %t
39 // RUN: FileCheck -Doutfile=bar/foo -Ddsymfile=external/foo.dSYM \
40 // RUN:           -check-prefix=CHECK-OUTPUT-NAME < %t %s
41 //
42 // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Linker", inputs: [{{.*}}], output: "[[outfile]]"
43 // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["[[outfile]]"], output: "[[dsymfile]]"
44 
45 // Check that we only use dsymutil when needed.
46 //
47 // RUN: touch %t.o
48 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
49 // RUN:   -o foo %t.o -g 2> %t
50 // RUN: not grep "Dsymutil" %t
51 
52 // Check that we don't crash when translating arguments for dsymutil.
53 // RUN: %clang -m32 -arch x86_64 -g %s -###
54