2018-08-15 23:25:25 +08:00
|
|
|
// REQUIRES: clang-driver
|
|
|
|
|
|
|
|
// Check that we raise an error if we're trying to compile OpenCL for amdhsa code but can't
|
|
|
|
// find a ROCm install, unless -nogpulib was passed.
|
|
|
|
|
|
|
|
// RUN: %clang -### --sysroot=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR
|
|
|
|
// RUN: %clang -### --rocm-path=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR
|
2020-07-01 12:00:04 +08:00
|
|
|
// ERR: cannot find ROCm device library. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
|
2018-08-15 23:25:25 +08:00
|
|
|
|
2020-05-07 00:05:16 +08:00
|
|
|
// Accept nogpulib or nostdlib for OpenCL.
|
2018-08-15 23:25:25 +08:00
|
|
|
// RUN: %clang -### -nogpulib --rocm-path=%s/no-rocm-there %s 2>&1 | FileCheck %s --check-prefix OK
|
2020-05-07 00:05:16 +08:00
|
|
|
// RUN: %clang -### -nostdlib --rocm-path=%s/no-rocm-there %s 2>&1 | FileCheck %s --check-prefix OK
|
2018-08-15 23:25:25 +08:00
|
|
|
// OK-NOT: cannot find ROCm installation.
|