Skip to content

Commit 05c09d3

Browse files
committed
test
1 parent 8c8885d commit 05c09d3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clang/test/Driver/hip-toolchain-rdc.hip

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,17 @@
161161
// output the executable
162162
// LNX: [[LD:".*ld.*"]] {{.*}}"-o" "a.out" {{.*}} [[A_OBJ_HOST]] [[B_OBJ_HOST]] [[OBJBUNDLE]]
163163
// MSVC: [[LD:".*lld-link.*"]] {{.*}}"-out:a.exe" {{.*}} [[A_OBJ_HOST]] [[B_OBJ_HOST]] [[OBJBUNDLE]]
164+
165+
// Check --flto-partitions
166+
167+
// RUN: %clang -### -fgpu-rdc --offload-arch=gfx90a -nogpulib -nogpuinc \
168+
// RUN: -L. -flto --flto-partitions=42 %s 2>&1 | FileCheck -check-prefix=LTO_PARTS %s
169+
// LTO_PARTS: lld{{.*}}"--lto-partitions=42"
170+
171+
// RUN: not %clang -### -fgpu-rdc --offload-arch=gfx90a -nogpulib -nogpuinc \
172+
// RUN: -L. -flto --flto-partitions=a %s 2>&1 | FileCheck -check-prefix=LTO_PARTS_INV0 %s
173+
// LTO_PARTS_INV0: clang: error: invalid integral value 'a' in '--flto-partitions=a'
174+
175+
// RUN: not %clang -### -fgpu-rdc --offload-arch=gfx90a -nogpulib -nogpuinc \
176+
// RUN: -L. -flto --flto-partitions=0 %s 2>&1 | FileCheck -check-prefix=LTO_PARTS_INV1 %s
177+
// LTO_PARTS_INV1: clang: error: invalid integral value '0' in '--flto-partitions=0'

0 commit comments

Comments
 (0)