• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// REQUIRES: clang-driver
2// REQUIRES: x86-registered-target
3// REQUIRES: amdgpu-registered-target
4
5// Make sure the appropriate device specific library is available.
6
7// We don't include every target in the test directory, so just pick a valid
8// target not included in the test.
9
10// RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=gfx902 \
11// RUN:   --rocm-path=%S/Inputs/rocm %s 2>&1 \
12// RUN:   | FileCheck -check-prefixes=COMMON,GFX902-DEFAULTLIBS %s
13
14// Should not interpret -nostdlib as disabling offload libraries.
15// RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=gfx902 -nostdlib \
16// RUN:   --rocm-path=%S/Inputs/rocm %s 2>&1 \
17// RUN:   | FileCheck -check-prefixes=COMMON,GFX902-DEFAULTLIBS %s
18
19
20// RUN: %clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=gfx902 -nogpulib \
21// RUN:   --rocm-path=%S/Inputs/rocm %s 2>&1 \
22// RUN:   | FileCheck -check-prefixes=COMMON,NODEFAULTLIBS %s
23
24
25// GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
26
27// NODEFAULTLIBS-NOT: error: cannot find
28
29// COMMON: "-triple" "amdgcn-amd-amdhsa"
30