xref: /llvm-project/llvm/test/tools/dsymutil/fat-binary-output.test (revision 0ed8194256c6c96875ed9dd102d15ee8a9260fec)
1RUN: dsymutil -f -verbose -no-output %p/Inputs/fat-test.dylib -oso-prepend-path %p | FileCheck %s
2
3RUN: dsymutil --linker parallel -f -verbose -no-output %p/Inputs/fat-test.dylib -oso-prepend-path %p | FileCheck %s
4
5This test doesn't produce any filesytstem output, we just look at the verbose
6log output.
7
8For each arch in the binary, check that we emit the right triple with the right
9file and the right symbol inside it (each slice has a different symbol, so that
10means that the logic is looking at the right file slice too).
11
12After the link of each architecture, check that lipo is correctly invoked to
13generate the fat output binary.
14
15CHECK: triple:          'x86_64-apple-darwin'
16CHECK:   - filename:        {{'?}}[[INPUTS_PATH:.*]]fat-test.o
17CHECK:   DW_AT_name{{.*}} "x86_64_var"
18
19CHECK: triple:          'i386-apple-darwin'
20CHECK:   - filename:        {{'?}}[[INPUTS_PATH]]fat-test.o
21CHECK:   DW_AT_name{{.*}} "i386_var"
22
23CHECK: triple:          'x86_64h-apple-darwin'
24CHECK:   - filename:        {{'?}}[[INPUTS_PATH]]fat-test.o
25CHECK:   DW_AT_name{{.*}} "x86_64h_var"
26
27CHECK: Running lipo
28CHECK-NEXT: lipo -create
29CHECK-SAME  [[TMP_PATH:.*?]]fat-test.dylib.tmp{{......}}.dwarf [[TMP_PATH]]fat-test.dylib.tmp{{......}}.dwarf [[TMP_PATH]]fat-test.dylib.tmp{{......}}.dwarf
30CHECK-SAME: -segalign x86_64 20 -segalign i386 20 -segalign x86_64h 20
31CHECK-SAME: -output [[INPUTS_PATH]]fat-test.dylib.dwarf
32
33