From f3c9342a3d56e1782e3b6db081401af334648492 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 29 Dec 2022 09:44:19 +0100 Subject: [PATCH] Fix build of nvptx-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 CUDA library. --- clang/tools/nvptx-arch/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/tools/nvptx-arch/CMakeLists.txt b/clang/tools/nvptx-arch/CMakeLists.txt index 94ef206..94f544a 100644 --- a/clang/tools/nvptx-arch/CMakeLists.txt +++ b/clang/tools/nvptx-arch/CMakeLists.txt @@ -25,4 +25,4 @@ add_clang_tool(nvptx-arch NVPTXArch.cpp) set_target_properties(nvptx-arch PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) target_include_directories(nvptx-arch PRIVATE ${CUDA_INCLUDE_DIRS}) -clang_target_link_libraries(nvptx-arch PRIVATE ${cuda-library}) +target_link_libraries(nvptx-arch PRIVATE ${cuda-library}) -- 2.7.4