1 // Check that we run dsymutil properly with multiple -arch options.
3 // RUN: %clang -ccc-host-triple 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
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}, assembler
10 // CHECK-MULTIARCH-ACTIONS: 3: assembler, {2}, object
11 // CHECK-MULTIARCH-ACTIONS: 4: linker, {3}, image
12 // CHECK-MULTIARCH-ACTIONS: 5: bind-arch, "i386", {4}, image
13 // CHECK-MULTIARCH-ACTIONS: 6: bind-arch, "x86_64", {4}, image
14 // CHECK-MULTIARCH-ACTIONS: 7: lipo, {5, 6}, image
15 // CHECK-MULTIARCH-ACTIONS: 8: dsymutil, {7}, dSYM
17 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
18 // RUN: -arch i386 -arch x86_64 %s -g 2> %t
19 // RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
21 // CHECK-MULTIARCH-BINDINGS: "x86_64-apple-darwin10" - "darwin::Lipo", inputs: [{{.*}}, {{.*}}], output: "a.out"
22 // CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
24 // Check output name derivation.
26 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
27 // RUN: -o foo %s -g 2> %t
28 // RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
30 // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
31 // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
33 // Check that we only use dsymutil when needed.
36 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
37 // RUN: -o foo %t.o -g 2> %t
38 // RUN: grep "Dsymutil" %t | count 0