[llvm-branch-commits] [clang] 46cfe51 - [amdgpu-arch] Fix build of amdgpu-arch with CLANG_LINK_CLANG_DYLIB
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 2 23:03:04 PST 2023
Author: Joseph Huber
Date: 2023-03-02T23:00:01-08:00
New Revision: 46cfe51ef9d190d0b4ae0485f5c1e3d96055b5ef
URL: https://github.com/llvm/llvm-project/commit/46cfe51ef9d190d0b4ae0485f5c1e3d96055b5ef
DIFF: https://github.com/llvm/llvm-project/commit/46cfe51ef9d190d0b4ae0485f5c1e3d96055b5ef.diff
LOG: [amdgpu-arch] Fix build of amdgpu-arch with CLANG_LINK_CLANG_DYLIB
The function clang_target_link_libraries must only be used with real
Clang libraries; with CLANG_LINK_CLANG_DYLIB, it will instead link in
clang-cpp. We must use the standard CMake target_link_libraries for
the HSA library.
(cherry picked from commit 067a5c68845c13d45e85ec9eaa11d2b2d829bab4)
Added:
Modified:
clang/tools/amdgpu-arch/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/amdgpu-arch/CMakeLists.txt b/clang/tools/amdgpu-arch/CMakeLists.txt
index d687d1691b7a6..2028cc266b5c4 100644
--- a/clang/tools/amdgpu-arch/CMakeLists.txt
+++ b/clang/tools/amdgpu-arch/CMakeLists.txt
@@ -14,7 +14,7 @@ add_clang_tool(amdgpu-arch AMDGPUArch.cpp)
find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
if (${hsa-runtime64_FOUND})
set_target_properties(amdgpu-arch PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON)
- clang_target_link_libraries(amdgpu-arch PRIVATE hsa-runtime64::hsa-runtime64)
+ target_link_libraries(amdgpu-arch PRIVATE hsa-runtime64::hsa-runtime64)
else()
target_compile_definitions(amdgpu-arch PRIVATE "DYNAMIC_HSA")
endif()
More information about the llvm-branch-commits
mailing list