xref: /llvm-project/llvm/test/tools/dsymutil/X86/multiple-inputs.test (revision f1fdfe6888f93b9f6dfb4689e1f3206de584ff5b)
1RUN: rm -rf %t
2RUN: mkdir -p %t
3
4RUN: cp %p/../Inputs/basic.macho.x86_64 %t/basic.macho.x86_64
5RUN: cp %p/../Inputs/basic-archive.macho.x86_64 %t/basic-archive.macho.x86_64
6RUN: cp %p/../Inputs/basic-lto.macho.x86_64 %t/basic-lto.macho.x86_64
7RUN: cp %p/../Inputs/basic-lto-dw4.macho.x86_64 %t/basic-lto-dw4.macho.x86_64
8
9# Multiple inputs in flat mode
10RUN: dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64
11RUN: llvm-dwarfdump -a %t/basic.macho.x86_64.dwarf \
12RUN:   | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,BASIC
13RUN: llvm-dwarfdump -a %t/basic-archive.macho.x86_64.dwarf \
14RUN:   | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,ARCHIVE
15RUN: llvm-dwarfdump -a %t/basic-lto.macho.x86_64.dwarf | FileCheck %S/basic-lto-linking-x86.test
16RUN: llvm-dwarfdump -a %t/basic-lto-dw4.macho.x86_64.dwarf | FileCheck %S/basic-lto-dw4-linking-x86.test
17
18# Multiple inputs that end up in the same named bundle
19RUN: dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM
20RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic.macho.x86_64 \
21RUN:   | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,BASIC
22RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-archive.macho.x86_64 \
23RUN:   | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,ARCHIVE
24RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto.macho.x86_64 | FileCheck %S/basic-lto-linking-x86.test
25RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto-dw4.macho.x86_64 | FileCheck %S/basic-lto-dw4-linking-x86.test
26
27# Multiple inputs in a named bundle in flat mode... impossible.
28RUN: not dsymutil -f -oso-prepend-path=%p/.. %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM 2>&1 | FileCheck %s
29
30## ---------------------------------------
31## Repeat the same steps for --linker parallel
32
33RUN: rm -rf %t
34RUN: mkdir -p %t
35
36RUN: cat %p/../Inputs/basic.macho.x86_64 > %t/basic.macho.x86_64
37RUN: cat %p/../Inputs/basic-archive.macho.x86_64 > %t/basic-archive.macho.x86_64
38RUN: cat %p/../Inputs/basic-lto.macho.x86_64 > %t/basic-lto.macho.x86_64
39RUN: cat %p/../Inputs/basic-lto-dw4.macho.x86_64 > %t/basic-lto-dw4.macho.x86_64
40
41# Multiple inputs in flat mode
42RUN: dsymutil --linker parallel -f -oso-prepend-path=%p/.. \
43RUN:   %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 \
44RUN:   %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64
45RUN: llvm-dwarfdump -a %t/basic.macho.x86_64.dwarf \
46RUN: | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,BASIC
47RUN: llvm-dwarfdump -a %t/basic-archive.macho.x86_64.dwarf \
48RUN: | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,ARCHIVE
49RUN: llvm-dwarfdump -a %t/basic-lto.macho.x86_64.dwarf | FileCheck %S/basic-lto-linking-x86.test
50RUN: llvm-dwarfdump -a %t/basic-lto-dw4.macho.x86_64.dwarf | FileCheck %S/basic-lto-dw4-linking-x86.test
51
52# Multiple inputs that end up in the same named bundle
53RUN: dsymutil --linker parallel -oso-prepend-path=%p/.. %t/basic.macho.x86_64 \
54RUN:   %t/basic-archive.macho.x86_64 %t/basic-lto.macho.x86_64 \
55RUN:   %t/basic-lto-dw4.macho.x86_64 -o %t.dSYM
56RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic.macho.x86_64 \
57RUN: | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,BASIC
58RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-archive.macho.x86_64 \
59RUN: | FileCheck %S/basic-linking-x86.test --check-prefixes=CHECK,ARCHIVE
60RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto.macho.x86_64 | FileCheck %S/basic-lto-linking-x86.test
61RUN: llvm-dwarfdump -a %t.dSYM/Contents/Resources/DWARF/basic-lto-dw4.macho.x86_64 | FileCheck %S/basic-lto-dw4-linking-x86.test
62
63# Multiple inputs in a named bundle in flat mode... impossible.
64RUN: not dsymutil --linker parallel -f -oso-prepend-path=%p/.. \
65RUN:   %t/basic.macho.x86_64 %t/basic-archive.macho.x86_64 \
66RUN:   %t/basic-lto.macho.x86_64 %t/basic-lto-dw4.macho.x86_64 \
67RUN:   -o %t.dSYM 2>&1 | FileCheck %s
68
69CHECK: error: cannot use -o with multiple inputs in flat mode
70