nonlinux
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Mon, 11 Sep 2023 13:40:42 +0000 (14:40 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Mon, 11 Sep 2023 13:40:42 +0000 (14:40 +0100)
https://reviews.llvm.org/D143017

[Libomptarget] Fix disabling amdgpu on non-Linux.

Previously, on non-Linux, amdgpu would get enabled whatever the CPU
architecture.

Gbp-Pq: Topic amdgpu
Gbp-Pq: Name nonlinux.patch

openmp/libomptarget/plugins/amdgpu/CMakeLists.txt

index 1619f1e451af2a6ade365947517d8b89f1cffc6a..e523f1df1c70b82491c2633109a1b64bc1e80fcd 100644 (file)
@@ -22,7 +22,7 @@ endif()
 # as of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
 find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
 
-if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux"))
   libomptarget_say("Not building AMDGPU plugin: only support AMDGPU in Linux x86_64, ppc64le, or aarch64 hosts")
   return()
 endif()