[clang] f3c9342 - Fix build of nvptx-arch with CLANG_LINK_CLANG_DYLIB
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 29 00:48:19 PST 2022
Author: Jonas Hahnfeld
Date: 2022-12-29T09:48:05+01:00
New Revision: f3c9342a3d56e1782e3b6db081401af334648492
URL: https://github.com/llvm/llvm-project/commit/f3c9342a3d56e1782e3b6db081401af334648492
DIFF: https://github.com/llvm/llvm-project/commit/f3c9342a3d56e1782e3b6db081401af334648492.diff
LOG: 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.
Added:
Modified:
clang/tools/nvptx-arch/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/nvptx-arch/CMakeLists.txt b/clang/tools/nvptx-arch/CMakeLists.txt
index 94ef206a3bd75..94f544a01f0e6 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})
More information about the cfe-commits
mailing list