|
1 | 1 | ; REQUIRES: x86
|
2 |
| -; RUN: opt -module-summary %s -o %t.o |
| 2 | +; RUN: rm -rf %t && mkdir %t && cd %t |
| 3 | +; RUN: mkdir d e |
| 4 | +; RUN: opt -module-summary %s -o b.bc |
3 | 5 | ; RUN: mkdir -p %t1 %t2
|
4 |
| -; RUN: opt -module-summary %p/Inputs/thin1.ll -o %t1/t.coll.o |
5 |
| -; RUN: opt -module-summary %p/Inputs/thin2.ll -o %t2/t.coll.o |
| 6 | +; RUN: opt -module-summary %p/Inputs/thin1.ll -o d/coll.o |
| 7 | +; RUN: opt -module-summary %p/Inputs/thin2.ll -o e/coll.o |
6 | 8 |
|
7 |
| -; RUN: rm -f %t.a |
8 |
| -; RUN: llvm-ar rcs %t.a %t1/t.coll.o %t2/t.coll.o |
9 |
| -; RUN: ld.lld %t.o %t.a -o %t |
10 |
| -; RUN: llvm-nm %t | FileCheck %s |
11 |
| - |
12 |
| -; Check without a archive symbol table |
13 |
| -; RUN: rm -f %t.a |
14 |
| -; RUN: llvm-ar rcS %t.a %t1/t.coll.o %t2/t.coll.o |
15 |
| -; RUN: ld.lld %t.o %t.a -o %t |
16 |
| -; RUN: llvm-nm %t | FileCheck %s |
| 9 | +; RUN: llvm-ar rcS d/a.a d/coll.o e/coll.o |
| 10 | +; RUN: ld.lld b.bc d/a.a -o out --save-temps |
| 11 | +; RUN: llvm-nm out | FileCheck %s |
| 12 | +; RUN: llvm-nm out2.lto.o | FileCheck %s --check-prefix=MOD2 |
| 13 | +; RUN: llvm-nm out3.lto.o | FileCheck %s --check-prefix=MOD3 |
17 | 14 |
|
18 | 15 | ; Check we handle this case correctly even in presence of --whole-archive.
|
19 |
| -; RUN: ld.lld %t.o --whole-archive %t.a -o %t |
20 |
| -; RUN: llvm-nm %t | FileCheck %s |
| 16 | +; RUN: rm out1.lto.o out2.lto.o out3.lto.o |
| 17 | +; RUN: ld.lld b.bc --whole-archive d/a.a -o out --save-temps |
| 18 | +; RUN: llvm-nm out | FileCheck %s |
| 19 | +; RUN: ls out1.lto.o out2.lto.o out3.lto.o |
21 | 20 |
|
22 | 21 | ; CHECK: T _start
|
23 | 22 | ; CHECK: T blah
|
24 | 23 | ; CHECK: T foo
|
25 | 24 |
|
| 25 | +; MOD2: T foo |
| 26 | +; MOD3: T blah |
| 27 | + |
26 | 28 | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
27 | 29 | target triple = "x86_64-scei-ps4"
|
28 | 30 |
|
|
0 commit comments