Daniel Dunbar | be1cc3e | 2010-06-04 18:28:41 +0000 | [diff] [blame] | 1 | // Check that we run dsymutil properly with multiple -arch options. |
| 2 | // |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 3 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \ |
Daniel Dunbar | be1cc3e | 2010-06-04 18:28:41 +0000 | [diff] [blame] | 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 | // |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 17 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Daniel Dunbar | be1cc3e | 2010-06-04 18:28:41 +0000 | [diff] [blame] | 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 Dunbar | 63cbbee | 2010-07-01 01:36:31 +0000 | [diff] [blame] | 22 | // CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM" |
Daniel Dunbar | be1cc3e | 2010-06-04 18:28:41 +0000 | [diff] [blame] | 23 | |
| 24 | // Check output name derivation. |
| 25 | // |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 26 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Daniel Dunbar | be1cc3e | 2010-06-04 18:28:41 +0000 | [diff] [blame] | 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 Dunbar | b5e2f69 | 2010-06-29 16:38:33 +0000 | [diff] [blame] | 32 | |
| 33 | // Check that we only use dsymutil when needed. |
| 34 | // |
| 35 | // RUN: touch %t.o |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 36 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Daniel Dunbar | b5e2f69 | 2010-06-29 16:38:33 +0000 | [diff] [blame] | 37 | // RUN: -o foo %t.o -g 2> %t |
| 38 | // RUN: grep "Dsymutil" %t | count 0 |
Daniel Dunbar | 59f9046 | 2011-03-25 18:16:51 +0000 | [diff] [blame] | 39 | |
| 40 | // Check that we put the .dSYM in the right place. |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 41 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Daniel Dunbar | 59f9046 | 2011-03-25 18:16:51 +0000 | [diff] [blame] | 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" |