blob: afb41a9db28b1fbd5a1b47ec039d3f7bd0a57fd7 [file] [log] [blame]
Daniel Dunbarbe1cc3e2010-06-04 18:28:41 +00001// Check that we run dsymutil properly with multiple -arch options.
2//
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
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}, 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
16//
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
20//
21// CHECK-MULTIARCH-BINDINGS: "x86_64-apple-darwin10" - "darwin::Lipo", inputs: [{{.*}}, {{.*}}], output: "a.out"
Daniel Dunbar63cbbee2010-07-01 01:36:31 +000022// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
Daniel Dunbarbe1cc3e2010-06-04 18:28:41 +000023
24// Check output name derivation.
25//
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
29//
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"
Daniel Dunbarb5e2f692010-06-29 16:38:33 +000032
33// Check that we only use dsymutil when needed.
34//
35// RUN: touch %t.o
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
Daniel Dunbar59f90462011-03-25 18:16:51 +000039
40// Check that we put the .dSYM in the right place.
41// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
42// RUN: -o bar/foo %s -g 2> %t
43// RUN: FileCheck -check-prefix=CHECK-LOCATION < %t %s
44
45// CHECK-LOCATION: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["bar/foo"], output: "bar/foo.dSYM"