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