|
28 | 28 |
|
29 | 29 | ;; Check that all WPD fails with --export-dynamic. |
30 | 30 |
|
| 31 | +; RUN: echo '.globl foo; foo:' > %ta.s |
| 32 | +; RUN: llvm-mc -filetype=obj %ta.s -o %ta.o |
| 33 | +; RUN: ld.lld -shared -soname=ta %ta.o -o %ta.so |
| 34 | + |
31 | 35 | ;; Index based WPD |
32 | 36 | ; RUN: ld.lld %t2.o -o %t3 -save-temps --lto-whole-program-visibility \ |
33 | 37 | ; RUN: -mllvm -pass-remarks=. \ |
|
49 | 53 | ;; Check that WPD fails for target _ZN1D1mEi with --export-dynamic-symbol=_ZTV1D. |
50 | 54 |
|
51 | 55 | ;; Index based WPD |
52 | | -; RUN: ld.lld %t2.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 56 | +; RUN: ld.lld %t2.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
53 | 57 | ; RUN: -mllvm -pass-remarks=. \ |
54 | 58 | ; RUN: --export-dynamic-symbol=_ZTV1D 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
55 | 59 | ; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
56 | 60 |
|
57 | 61 | ;; Hybrid WPD |
58 | | -; RUN: ld.lld %t.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 62 | +; RUN: ld.lld %t.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
59 | 63 | ; RUN: -mllvm -pass-remarks=. \ |
60 | 64 | ; RUN: --export-dynamic-symbol=_ZTV1D 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
61 | 65 | ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
62 | 66 |
|
63 | 67 | ;; Regular LTO WPD |
64 | | -; RUN: ld.lld %t4.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 68 | +; RUN: ld.lld %t4.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
65 | 69 | ; RUN: -mllvm -pass-remarks=. \ |
66 | 70 | ; RUN: --export-dynamic-symbol=_ZTV1D 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
67 | 71 | ; RUN: llvm-dis %t3.0.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
|
74 | 78 | ; RUN: echo "{ _ZTV1D; };" > %t.list |
75 | 79 |
|
76 | 80 | ;; Index based WPD |
77 | | -; RUN: ld.lld %t2.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 81 | +; RUN: ld.lld %t2.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
78 | 82 | ; RUN: -mllvm -pass-remarks=. \ |
79 | 83 | ; RUN: --dynamic-list=%t.list 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
80 | 84 | ; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
81 | 85 |
|
82 | 86 | ;; Hybrid WPD |
83 | | -; RUN: ld.lld %t.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 87 | +; RUN: ld.lld %t.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
84 | 88 | ; RUN: -mllvm -pass-remarks=. \ |
85 | 89 | ; RUN: --dynamic-list=%t.list 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
86 | 90 | ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
87 | 91 |
|
88 | 92 | ;; Regular LTO WPD |
89 | | -; RUN: ld.lld %t4.o -o %t3 -save-temps --lto-whole-program-visibility \ |
| 93 | +; RUN: ld.lld %t4.o %ta.so -o %t3 -save-temps --lto-whole-program-visibility \ |
90 | 94 | ; RUN: -mllvm -pass-remarks=. \ |
91 | 95 | ; RUN: --dynamic-list=%t.list 2>&1 | FileCheck %s --check-prefix=REMARK-AONLY |
92 | 96 | ; RUN: llvm-dis %t3.0.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-AONLY-IR |
|
0 commit comments