https://github.com/theoparis created https://github.com/llvm/llvm-project/pull/133596
This fixes building with LLVM_TOOL_LLVM_DRIVER_BUILD and LLVM_LINK_LLVM_DYLIB set to true. CMake requires that "all uses of target_link_libraries with a target must be either all-keyword or all-plain". >From 183eac555a5aaf1ec0d2bd208506131351093a81 Mon Sep 17 00:00:00 2001 From: Theo Paris <t...@tinted.dev> Date: Sat, 29 Mar 2025 13:15:58 -0700 Subject: [PATCH] [cmake] Add type to target_link_libraries This fixes building with LLVM_TOOL_LLVM_DRIVER_BUILD and LLVM_LINK_LLVM_DYLIB set to true. Cmake requires that "all uses of target_link_libraries with a target must be either all-keyword or all-plain". --- clang/cmake/modules/AddClang.cmake | 2 +- lld/tools/lld/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index cdc8bd5cd503b..45dd60206195d 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -213,7 +213,7 @@ endmacro() function(clang_target_link_libraries target type) if (TARGET obj.${target}) - target_link_libraries(obj.${target} ${ARGN}) + target_link_libraries(obj.${target} ${type} ${ARGN}) endif() get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS) diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt index 8498a91597a93..1d1a7ff448b7c 100644 --- a/lld/tools/lld/CMakeLists.txt +++ b/lld/tools/lld/CMakeLists.txt @@ -13,7 +13,7 @@ export_executable_symbols_for_plugins(lld) function(lld_target_link_libraries target type) if (TARGET obj.${target}) - target_link_libraries(obj.${target} ${ARGN}) + target_link_libraries(obj.${target} ${type} ${ARGN}) endif() get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits