Skip to content

Commit b0805df

Browse files
committed
[NFC] Update test - some streamlining
Signed-off-by: Michael D Toguchi <[email protected]>
1 parent fa6c8fa commit b0805df

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

clang/test/Driver/sycl-offload-static-lib-2.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@
1515
// RUN: llvm-ar cr %t_2.a %t1_bundle.o
1616
//
1717
// RUN: touch %t.a
18+
// RUN: touch %t.lo
1819
// RUN: touch %t.o
1920
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.a -### %t.o 2>&1 \
2021
// 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
2124
// STATIC_LIB: ld{{(.exe)?}}" "-r" "-o" "[[INPUTLD:[^ ]+\.o]]" {{.*}} "-L/dummy/dir"{{.*}} "[[INPUTO]]" "[[INPUTA]]"
2225
// STATIC_LIB: clang-offload-bundler{{.*}} "-type=oo" {{.*}} "-inputs=[[INPUTLD]]" "-outputs=[[LISTFILE:.+\.txt]]"
2326
// STATIC_LIB: llvm-link{{.*}} "@[[LISTFILE]]"
2427
// STATIC_LIB: ld{{.*}} "[[INPUTA]]" "[[INPUTO]]"
2528

26-
// RUN: touch %t.lo
27-
// RUN: touch %t.o
28-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.lo -### %t.o 2>&1 \
29-
// RUN: | FileCheck %s -check-prefix=STATIC_LIB_LO -DINPUTLO=%t.lo -DINPUTO=%t.o
30-
// STATIC_LIB_LO: ld{{(.exe)?}}" "-r" "-o" "[[INPUTLD:[^ ]+\.o]]" {{.*}} "-L/dummy/dir"{{.*}} "[[INPUTO]]" "[[INPUTLO]]"
31-
// STATIC_LIB_LO: clang-offload-bundler{{.*}} "-type=oo" {{.*}} "-inputs=[[INPUTLD]]" "-outputs=[[LISTFILE:.+\.txt]]"
32-
// STATIC_LIB_LO: llvm-link{{.*}} "@[[LISTFILE]]"
33-
// STATIC_LIB_LO: ld{{.*}} "[[INPUTLO]]" "[[INPUTO]]"
34-
3529
/// ###########################################################################
3630

3731
/// test behaviors of fat static lib with multiple objects
@@ -106,11 +100,10 @@
106100

107101
/// test behaviors of static lib with no source/object
108102
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.a -### 2>&1 \
109-
// RUN: | FileCheck %s -check-prefixes=STATIC_LIB_NOSRC,STATIC_LIB_NOSRC_A
103+
// RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -DINPUTLIB=%t.a
110104
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t.lo -### 2>&1 \
111-
// RUN: | FileCheck %s -check-prefixes=STATIC_LIB_NOSRC,STATIC_LIB_NOSRC_LO
112-
// STATIC_LIB_NOSRC_A: clang-offload-bundler{{.*}} "-type=ao" "-targets=host-x86_64-unknown-linux-gnu" "-inputs=[[INPUTLIB:.+\.a]]" "-check-section"
113-
// STATIC_LIB_NOSRC_LO: clang-offload-bundler{{.*}} "-type=ao" "-targets=host-x86_64-unknown-linux-gnu" "-inputs=[[INPUTLIB:.+\.lo]]" "-check-section"
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"
114107
// STATIC_LIB_NOSRC: ld{{.*}} "-r" "-o" "[[PARTIALOBJ:.+\.o]]" "{{.*}}crt1.o" {{.*}} "-L/dummy/dir" {{.*}} "[[INPUTLIB]]"
115108
// STATIC_LIB_NOSRC: clang-offload-bundler{{.*}} "-type=oo" "-targets=sycl-spir64-unknown-unknown-sycldevice" "-inputs=[[PARTIALOBJ]]" "-outputs=[[DEVICELIST:.+\.txt]]" "-unbundle"
116109
// STATIC_LIB_NOSRC: llvm-link{{.*}} "@[[DEVICELIST]]" "-o" "[[BCFILE:.+\.bc]]"

0 commit comments

Comments
 (0)