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