Skip to content

Commit 57fa6e4

Browse files
committed
Document mlir_target_link_libraries
1 parent a5c6dc6 commit 57fa6e4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,14 @@ function(mlir_check_all_link_libraries name)
718718
endif()
719719
endfunction(mlir_check_all_link_libraries)
720720

721+
# Link target against a list of MLIR libraries. If MLIR_LINK_MLIR_DYLIB is
722+
# enabled, this will link against the MLIR dylib instead of the static
723+
# libraries.
724+
#
725+
# This function should be used instead of target_link_libraries() when linking
726+
# MLIR libraries that are part of the MLIR dylib. For libraries that are not
727+
# part of the dylib (like test libraries), target_link_libraries() should be
728+
# used.
721729
function(mlir_target_link_libraries target type)
722730
if (TARGET obj.${target})
723731
target_link_libraries(obj.${target} ${ARGN})

0 commit comments

Comments
 (0)