Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/cmake/modules/AddClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lld/tools/lld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 1 addition & 4 deletions llvm/cmake/modules/LLVM-Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mlir/cmake/modules/AddMLIR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading