blob: 4439547ea8ad980f3efb99fcf141ed13beeea433 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// RUN: %clang -### --target=x86_64-linux-gnu \
// RUN: -x hip --cuda-gpu-arch=gfx803 -flto-partitions=42 \
// RUN: --no-offload-new-driver --emit-static-lib -nogpulib \
// RUN: -fuse-ld=lld -B%S/Inputs/lld -fgpu-rdc -nogpuinc \
// RUN: %S/Inputs/hip_multiple_inputs/a.cu \
// RUN: %S/Inputs/hip_multiple_inputs/b.hip \
// RUN: 2>&1 | FileCheck %s --check-prefix=FIXED-PARTS
// FIXED-PARTS-NOT: "*.llvm-link"
// FIXED-PARTS-NOT: ".*opt"
// FIXED-PARTS-NOT: ".*llc"
// FIXED-PARTS: [[LLD: ".*lld.*"]] {{.*}} "-plugin-opt=-amdgpu-internalize-symbols"
// FIXED-PARTS-SAME: "--lto-partitions=42"
// FIXED-PARTS-SAME: "-plugin-opt=mcpu=gfx803"
// FIXED-PARTS-SAME: "-o" "{{.*out}}" "{{.*bc}}"
// RUN: not %clang -### --target=x86_64-linux-gnu \
// RUN: -x hip --cuda-gpu-arch=gfx803 -flto-partitions=a \
// RUN: --no-offload-new-driver --emit-static-lib -nogpulib \
// RUN: -fuse-ld=lld -B%S/Inputs/lld -fgpu-rdc -nogpuinc \
// RUN: %S/Inputs/hip_multiple_inputs/a.cu \
// RUN: %S/Inputs/hip_multiple_inputs/b.hip \
// RUN: 2>&1 | FileCheck %s --check-prefix=LTO_PARTS_INV0
// LTO_PARTS_INV0: clang: error: invalid integral value 'a' in '-flto-partitions=a'
// RUN: not %clang -### --target=x86_64-linux-gnu \
// RUN: -x hip --cuda-gpu-arch=gfx803 -flto-partitions=0 \
// RUN: --no-offload-new-driver --emit-static-lib -nogpulib \
// RUN: -fuse-ld=lld -B%S/Inputs/lld -fgpu-rdc -nogpuinc \
// RUN: %S/Inputs/hip_multiple_inputs/a.cu \
// RUN: %S/Inputs/hip_multiple_inputs/b.hip \
// RUN: 2>&1 | FileCheck %s --check-prefix=LTO_PARTS_INV1
// LTO_PARTS_INV1: clang: error: invalid integral value '0' in '-flto-partitions=0'
|