Revert "[CMake] Use keyword signature in two additional callsites (#1… - #184186
Conversation
…vm#183889)" This reverts commit 2342db0. Revert "[CMake] Propagate dependencies to OBJECT libraries in `add_llvm_library` (llvm#183541)" This reverts commit e3c0454.
|
@llvm/pr-subscribers-lld @llvm/pr-subscribers-mlir Author: None (gulfemsavrun) Changes…83889)" This reverts commit 2342db0. Revert "[CMake] Propagate dependencies to OBJECT libraries in This reverts commit e3c0454. Full diff: https://github.com/llvm/llvm-project/pull/184186.diff 5 Files Affected:
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
index e2112d7c326e2..c811b7f459126 100644
--- a/clang/cmake/modules/AddClang.cmake
+++ b/clang/cmake/modules/AddClang.cmake
@@ -217,7 +217,7 @@ endmacro()
function(clang_target_link_libraries target type)
if (TARGET obj.${target})
- target_link_libraries(obj.${target} ${type} ${ARGN})
+ target_link_libraries(obj.${target} ${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 1d1a7ff448b7c..8498a91597a93 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} ${type} ${ARGN})
+ target_link_libraries(obj.${target} ${ARGN})
endif()
get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 386ffd99c570b..f59002bc6c837 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -636,12 +636,7 @@ function(llvm_add_library name)
# Do add_dependencies(obj) later due to CMake issue 14747.
list(APPEND objlibs ${obj_name})
- # Bring in the target include directories and link info from our original
- # target. target_link_libraries propagates transitive dependencies with
- # proper SYSTEM include handling from IMPORTED targets.
- # target_include_directories propagates include directories set directly on
- # the target.
- target_link_libraries(${obj_name} PRIVATE $<TARGET_PROPERTY:${name},LINK_LIBRARIES>)
+ # Bring in the target include directories from our original target.
target_include_directories(${obj_name} PRIVATE $<TARGET_PROPERTY:${name},INCLUDE_DIRECTORIES>)
set_target_properties(${obj_name} PROPERTIES FOLDER "${subproject_title}/Object Libraries")
diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake
index 7da7e40f3b0fe..96ccf20aa89bd 100644
--- a/llvm/cmake/modules/LLVM-Config.cmake
+++ b/llvm/cmake/modules/LLVM-Config.cmake
@@ -106,10 +106,7 @@ function(explicit_llvm_config executable)
get_target_property(t ${executable} TYPE)
if(t STREQUAL "STATIC_LIBRARY")
target_link_libraries(${executable} INTERFACE ${LIBRARIES})
- elseif(t STREQUAL "EXECUTABLE" OR
- t STREQUAL "SHARED_LIBRARY" OR
- t STREQUAL "MODULE_LIBRARY" OR
- t STREQUAL "OBJECT_LIBRARY")
+ elseif(t STREQUAL "EXECUTABLE" OR t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
target_link_libraries(${executable} PRIVATE ${LIBRARIES})
else()
# Use plain form for legacy user.
diff --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake
index 60b73876d53fe..b240aeba23109 100644
--- a/mlir/cmake/modules/AddMLIR.cmake
+++ b/mlir/cmake/modules/AddMLIR.cmake
@@ -769,7 +769,7 @@ endfunction(mlir_check_all_link_libraries)
# used.
function(mlir_target_link_libraries target type)
if (TARGET obj.${target})
- target_link_libraries(obj.${target} ${type} ${ARGN})
+ target_link_libraries(obj.${target} ${ARGN})
endif()
if (MLIR_LINK_MLIR_DYLIB)
|
nextsilicon-itay-bookstein
left a comment
There was a problem hiding this comment.
LGTM, thanks for creating the revert. I'll prepare a new patch which fixes the additional missing callsite from your regression.
|
Thanks for reverting, in general in the future though please include the revert reason in the commit message |
…vm#1… (llvm#184186) …83889)" This reverts commit 2342db0. Revert "[CMake] Propagate dependencies to OBJECT libraries in `add_llvm_library` (llvm#183541)" This reverts commit e3c0454.
llvm#184186) …83889)" This reverts commit 2342db0. Revert "[CMake] Propagate dependencies to OBJECT libraries in `add_llvm_library` (llvm#183541)" This reverts commit e3c0454.
I put the revert reason in the PR thread, but I'll make sure the commit description covers it next time as well. Appreciate the feedback. |
…83889)"
This reverts commit 2342db0.
Revert "[CMake] Propagate dependencies to OBJECT libraries in
add_llvm_library(#183541)"This reverts commit e3c0454.