CMakeDetermineHIPCompiler: fix missing multiarch search path

In Debian/Ubuntu hip-lang-config.cmake is installed in multiarch path
and while searching for it we should have a proper fall back to systems
LIBRARY_ARCHITECTURE variable

MR in Debian: https://salsa.debian.org/cmake-team/cmake/-/merge_requests/15
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/2143705
This commit is contained in:
Talha Can Havadar
2026-03-09 10:19:50 +01:00
committed by Brad King
parent b121cf2c61
commit e8381e42ef

View File

@@ -242,6 +242,8 @@ if(CMAKE_HIP_PLATFORM STREQUAL "amd" OR CMAKE_HIP_PLATFORM STREQUAL "spirv")
)
if(CMAKE_HIP_LIBRARY_ARCHITECTURE)
list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_HIP_LIBRARY_ARCHITECTURE}")
elseif(CMAKE_LIBRARY_ARCHITECTURE)
list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
foreach(dir IN LISTS _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS)
if(EXISTS "${dir}/cmake/hip-lang/hip-lang-config.cmake")