1 // REQUIRES: x86-registered-target 2 // UNSUPPORTED: system-windows 3 4 // RUN: %clang -### -x hip -target x86_64-linux-gnu --offload= \ 5 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \ 6 // RUN: 2>&1 | FileCheck --check-prefix=INVALID-TARGET %s 7 // RUN: %clang -### -x hip -target x86_64-linux-gnu --offload=foo \ 8 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \ 9 // RUN: 2>&1 | FileCheck --check-prefix=INVALID-TARGET %s 10 11 // INVALID-TARGET: error: invalid or unsupported offload target: '{{.*}}' 12 13 // In the future we should be able to specify multiple targets for HIP 14 // compilation but currently it is not supported. 15 // 16 // RUN: %clang -### -x hip -target x86_64-linux-gnu --offload=foo,bar \ 17 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \ 18 // RUN: 2>&1 | FileCheck --check-prefix=TOO-MANY-TARGETS %s 19 // RUN: %clang -### -x hip -target x86_64-linux-gnu \ 20 // RUN: --offload=foo --offload=bar \ 21 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \ 22 // RUN: 2>&1 | FileCheck --check-prefix=TOO-MANY-TARGETS %s 23 24 // TOO-MANY-TARGETS: error: only one offload target is supported 25 26 // RUN: %clang -### -x hip -target x86_64-linux-gnu -nogpuinc -nogpulib \ 27 // RUN: --offload=amdgcn-amd-amdhsa --offload-arch=gfx900 %s \ 28 // RUN: 2>&1 | FileCheck --check-prefix=OFFLOAD-ARCH-MIX %s 29 30 // OFFLOAD-ARCH-MIX: error: option '--offload-arch' cannot be specified with '--offload' 31