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