Skip to content

Commit 5ff5a1f

Browse files
authored
Revert "[CMake] Use keyword signature in two additional callsites (#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.
1 parent ae363d5 commit 5ff5a1f

5 files changed

Lines changed: 5 additions & 13 deletions

File tree

clang/cmake/modules/AddClang.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ endmacro()
217217

218218
function(clang_target_link_libraries target type)
219219
if (TARGET obj.${target})
220-
target_link_libraries(obj.${target} ${type} ${ARGN})
220+
target_link_libraries(obj.${target} ${ARGN})
221221
endif()
222222

223223
get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)

lld/tools/lld/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export_executable_symbols_for_plugins(lld)
1313

1414
function(lld_target_link_libraries target type)
1515
if (TARGET obj.${target})
16-
target_link_libraries(obj.${target} ${type} ${ARGN})
16+
target_link_libraries(obj.${target} ${ARGN})
1717
endif()
1818

1919
get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,7 @@ function(llvm_add_library name)
636636
# Do add_dependencies(obj) later due to CMake issue 14747.
637637
list(APPEND objlibs ${obj_name})
638638

639-
# Bring in the target include directories and link info from our original
640-
# target. target_link_libraries propagates transitive dependencies with
641-
# proper SYSTEM include handling from IMPORTED targets.
642-
# target_include_directories propagates include directories set directly on
643-
# the target.
644-
target_link_libraries(${obj_name} PRIVATE $<TARGET_PROPERTY:${name},LINK_LIBRARIES>)
639+
# Bring in the target include directories from our original target.
645640
target_include_directories(${obj_name} PRIVATE $<TARGET_PROPERTY:${name},INCLUDE_DIRECTORIES>)
646641

647642
set_target_properties(${obj_name} PROPERTIES FOLDER "${subproject_title}/Object Libraries")

llvm/cmake/modules/LLVM-Config.cmake

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ function(explicit_llvm_config executable)
106106
get_target_property(t ${executable} TYPE)
107107
if(t STREQUAL "STATIC_LIBRARY")
108108
target_link_libraries(${executable} INTERFACE ${LIBRARIES})
109-
elseif(t STREQUAL "EXECUTABLE" OR
110-
t STREQUAL "SHARED_LIBRARY" OR
111-
t STREQUAL "MODULE_LIBRARY" OR
112-
t STREQUAL "OBJECT_LIBRARY")
109+
elseif(t STREQUAL "EXECUTABLE" OR t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
113110
target_link_libraries(${executable} PRIVATE ${LIBRARIES})
114111
else()
115112
# Use plain form for legacy user.

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ endfunction(mlir_check_all_link_libraries)
769769
# used.
770770
function(mlir_target_link_libraries target type)
771771
if (TARGET obj.${target})
772-
target_link_libraries(obj.${target} ${type} ${ARGN})
772+
target_link_libraries(obj.${target} ${ARGN})
773773
endif()
774774

775775
if (MLIR_LINK_MLIR_DYLIB)

0 commit comments

Comments
 (0)