|
10 | 10 | // Build a fat static lib that will be used for all tests
|
11 | 11 | // RUN: echo "void foo(void) {}" > %t1.cpp
|
12 | 12 | // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl %t1.cpp -c -o %t1_bundle.o
|
13 |
| -// RUN: llvm-ar crv %t.a %t1_bundle.o |
| 13 | +// RUN: llvm-ar cr %t.a %t1_bundle.o |
| 14 | +// RUN: llvm-ar cr %t.lo %t1_bundle.o |
| 15 | +// RUN: llvm-ar cr %t_2.a %t1_bundle.o |
14 | 16 | //
|
15 | 17 | // RUN: touch %t.a
|
| 18 | +// RUN: touch %t.lo |
16 | 19 | // RUN: touch %t.o
|
17 | 20 | // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.a -### %t.o 2>&1 \
|
18 |
| -// RUN: | FileCheck %s -check-prefix=STATIC_LIB |
19 |
| -// STATIC_LIB: ld{{(.exe)?}}" "-r" "-o" {{.*}} "[[INPUT:.+\.o]]" "-L/dummy/dir"{{.*}} "[[INPUT:.+\.a]]" |
20 |
| -// STATIC_LIB: clang-offload-bundler{{.*}} "-type=oo" |
21 |
| -// STATIC_LIB: llvm-link{{.*}} "@{{.*}}" |
| 21 | +// RUN: | FileCheck %s -check-prefix=STATIC_LIB -DINPUTA=%t.a -DINPUTO=%t.o |
| 22 | +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.lo -### %t.o 2>&1 \ |
| 23 | +// RUN: | FileCheck %s -check-prefix=STATIC_LIB -DINPUTA=%t.lo -DINPUTO=%t.o |
| 24 | +// STATIC_LIB: ld{{(.exe)?}}" "-r" "-o" "[[INPUTLD:[^ ]+\.o]]" {{.*}} "-L/dummy/dir"{{.*}} "[[INPUTO]]" "[[INPUTA]]" |
| 25 | +// STATIC_LIB: clang-offload-bundler{{.*}} "-type=oo" {{.*}} "-inputs=[[INPUTLD]]" "-outputs=[[LISTFILE:.+\.txt]]" |
| 26 | +// STATIC_LIB: llvm-link{{.*}} "@[[LISTFILE]]" |
| 27 | +// STATIC_LIB: ld{{.*}} "[[INPUTA]]" "[[INPUTO]]" |
22 | 28 |
|
23 | 29 | /// ###########################################################################
|
24 | 30 |
|
|
94 | 100 |
|
95 | 101 | /// test behaviors of static lib with no source/object
|
96 | 102 | // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.a -### 2>&1 \
|
97 |
| -// RUN: | FileCheck %s -check-prefixes=STATIC_LIB_NOSRC |
98 |
| -// STATIC_LIB_NOSRC: clang-offload-bundler{{.*}} "-type=ao" "-targets=host-x86_64-unknown-linux-gnu" "-inputs=[[INPUTLIB:.+\.a]]" "-check-section" |
| 103 | +// RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -DINPUTLIB=%t.a |
| 104 | +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.lo -### 2>&1 \ |
| 105 | +// RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -DINPUTLIB=%t.lo |
| 106 | +// STATIC_LIB_NOSRC: clang-offload-bundler{{.*}} "-type=ao" "-targets=host-x86_64-unknown-linux-gnu" "-inputs=[[INPUTLIB]]" "-check-section" |
99 | 107 | // STATIC_LIB_NOSRC: ld{{.*}} "-r" "-o" "[[PARTIALOBJ:.+\.o]]" "{{.*}}crt1.o" {{.*}} "-L/dummy/dir" {{.*}} "[[INPUTLIB]]"
|
100 | 108 | // STATIC_LIB_NOSRC: clang-offload-bundler{{.*}} "-type=oo" "-targets=sycl-spir64-unknown-unknown-sycldevice" "-inputs=[[PARTIALOBJ]]" "-outputs=[[DEVICELIST:.+\.txt]]" "-unbundle"
|
101 | 109 | // STATIC_LIB_NOSRC: llvm-link{{.*}} "@[[DEVICELIST]]" "-o" "[[BCFILE:.+\.bc]]"
|
|
0 commit comments