Eric Christopher | f857186 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 1 | // Check that we verify debug output properly with multiple -arch options. |
| 2 | // |
Eric Christopher | a5cf92d | 2011-08-23 21:47:58 +0000 | [diff] [blame] | 3 | // REQUIRES: asserts |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 4 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \ |
Eric Christopher | f857186 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 5 | // RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t |
| 6 | // RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s |
| 7 | // |
| 8 | // CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c |
| 9 | // CHECK-MULTIARCH-ACTIONS: 8: dsymutil, {7}, dSYM |
| 10 | // CHECK-MULTIARCH-ACTIONS: 9: verify, {8}, none |
| 11 | // |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 12 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Eric Christopher | f857186 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 13 | // RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t |
| 14 | // RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s |
| 15 | // |
| 16 | // CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM" |
| 17 | // CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing) |
| 18 | |
| 19 | // Check output name derivation. |
| 20 | // |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 21 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Eric Christopher | f857186 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 22 | // RUN: -verify -o foo %s -g 2> %t |
| 23 | // RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s |
| 24 | // |
| 25 | // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo" |
| 26 | // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM" |
| 27 | // CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing) |
| 28 | |
| 29 | // Check that we only verify when needed. |
| 30 | // |
| 31 | // RUN: touch %t.o |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 32 | // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \ |
Eric Christopher | f857186 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 33 | // RUN: -verify -o foo %t.o -g 2> %t |
| 34 | // RUN: grep "Verify" %t | count 0 |