1// REQUIRES: clang-driver 2// REQUIRES: amdgpu-registered-target 3 4// Make sure the appropriate device specific library is available. 5 6// We don't include every target in the test directory, so just pick a valid 7// target not included in the test. 8 9// RUN: %clang -### -v -target amdgcn-amd-amdhsa -mcpu=gfx902 \ 10// RUN: --rocm-path=%S/Inputs/rocm %s 2>&1 \ 11// RUN: | FileCheck -check-prefixes=COMMON,GFX902-DEFAULTLIBS %s 12 13 14// RUN: %clang -### -v -target amdgcn-amd-amdhsa -mcpu=gfx902 -nogpulib \ 15// RUN: --rocm-path=%S/Inputs/rocm %s 2>&1 \ 16// RUN: | FileCheck -check-prefixes=COMMON,NODEFAULTLIBS %s 17 18// 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 19 20// NODEFAULTLIBS-NOT: error: cannot find 21 22// COMMON: "-triple" "amdgcn-amd-amdhsa" 23