brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 5300c78 Raw
72 lines · c
1// Check that we run dsymutil properly with multiple -arch options.2//3// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-phases \4// RUN:   -arch i386 -arch x86_64 %s -g 2> %t5// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s6//7// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-dsymutil.c", c8// CHECK-MULTIARCH-ACTIONS: 1: preprocessor, {0}, cpp-output9// CHECK-MULTIARCH-ACTIONS: 2: compiler, {1}, ir10// CHECK-MULTIARCH-ACTIONS: 3: backend, {2}, assembler11// CHECK-MULTIARCH-ACTIONS: 4: assembler, {3}, object12// CHECK-MULTIARCH-ACTIONS: 5: linker, {4}, image13// CHECK-MULTIARCH-ACTIONS: 6: bind-arch, "i386", {5}, image14// CHECK-MULTIARCH-ACTIONS: 7: bind-arch, "x86_64", {5}, image15// CHECK-MULTIARCH-ACTIONS: 8: lipo, {6, 7}, image16// CHECK-MULTIARCH-ACTIONS: 9: dsymutil, {8}, dSYM17//18// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \19// RUN:   -arch i386 -arch x86_64 %s -g 2> %t20// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s21//22// CHECK-MULTIARCH-BINDINGS: "x86_64-apple-darwin11" - "darwin::Lipo", inputs: [{{.*}}, {{.*}}], output: "a.out"23// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin11" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"24 25// Check output name derivation.26//27// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \28// RUN:   -o foo %s -g 2> %t29// RUN: FileCheck -Doutfile=foo -Ddsymfile=foo.dSYM \30// RUN:          -check-prefix=CHECK-OUTPUT-NAME < %t %s31//32// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \33// RUN:   -o bar/foo %s -g 2> %t34// RUN: FileCheck -Doutfile=bar/foo -Ddsymfile=bar/foo.dSYM \35// RUN:           -check-prefix=CHECK-OUTPUT-NAME < %t %s36//37// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \38// RUN:   -o bar/foo -dsym-dir external %s -g 2> %t39// RUN: FileCheck -Doutfile=bar/foo -Ddsymfile=external/foo.dSYM \40// RUN:           -check-prefix=CHECK-OUTPUT-NAME < %t %s41//42// CHECK-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::Linker", inputs: [{{.*}}], output: "[[outfile]]"43// CHECK-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::Dsymutil", inputs: ["[[outfile]]"], output: "[[dsymfile]]"44 45// Check output name derivation for multiple -arch options.46//47// RUN: %clang -target x86_64-apple-darwin11 \48// RUN:   -arch x86_64 -arch arm64 -ccc-print-bindings %s 2> %t49// RUN: FileCheck --check-prefix=CHECK-MULTIARCH-OUTPUT-NAME < %t %s50//51// CHECK-MULTIARCH-OUTPUT-NAME: "x86_64-apple-darwin11" - "darwin::Linker", inputs: ["{{.*}}{{/|\\}}darwin-dsymutil-x86_64.o"], output: "{{.*}}{{/|\\}}darwin-dsymutil-x86_64.out"52// CHECK-MULTIARCH-OUTPUT-NAME: "arm64-apple-darwin11" - "darwin::Linker", inputs: ["{{.*}}{{/|\\}}darwin-dsymutil-arm64.o"], output: "{{.*}}{{/|\\}}darwin-dsymutil-arm64.out"53// CHECK-MULTIARCH-OUTPUT-NAME: "arm64-apple-darwin11" - "darwin::Lipo", inputs: ["{{.*}}{{/|\\}}darwin-dsymutil-x86_64.out", "{{.*}}{{/|\\}}darwin-dsymutil-arm64.out"], output: "a.out"54//55// RUN: %clang -target x86_64-apple-darwin11 \56// RUN:   -Wl,-foo -arch x86_64 -arch arm64 -ccc-print-bindings %s 2> %t57// RUN: FileCheck --check-prefix=CHECK-MULTIARCH-OUTPUT-NAME-WITH-ARG < %t %s58//59// CHECK-MULTIARCH-OUTPUT-NAME-WITH-ARG: "x86_64-apple-darwin11" - "darwin::Linker", inputs: [(input arg), "{{.*}}{{/|\\}}darwin-dsymutil-x86_64.o"], output: "{{.*}}{{/|\\}}darwin-dsymutil-x86_64.out"60// CHECK-MULTIARCH-OUTPUT-NAME-WITH-ARG: "arm64-apple-darwin11" - "darwin::Linker", inputs: [(input arg), "{{.*}}{{/|\\}}darwin-dsymutil-arm64.o"], output: "{{.*}}{{/|\\}}darwin-dsymutil-arm64.out"61// CHECK-MULTIARCH-OUTPUT-NAME-WITH-ARG: "arm64-apple-darwin11" - "darwin::Lipo", inputs: ["{{.*}}{{/|\\}}darwin-dsymutil-x86_64.out", "{{.*}}{{/|\\}}darwin-dsymutil-arm64.out"], output: "a.out"62 63// Check that we only use dsymutil when needed.64//65// RUN: touch %t.o66// RUN: %clang -target x86_64-apple-darwin11 -ccc-print-bindings \67// RUN:   -o foo %t.o -g 2> %t68// RUN: not grep "Dsymutil" %t69 70// Check that we don't crash when translating arguments for dsymutil.71// RUN: %clang -m32 -target x86_64-apple-darwin11 -arch x86_64 -g %s -###72