[flang] [cmake] Call mlir_target_link_libraries() only with MLIR_LIBS
Do not call `mlir_target_link_libraries()` when there are no `MLIR_LIBS` specified. This fixes a failure when `flang/runtime` is being built standalone, as it does not use MLIR and therefore the function is not defined: https://lab.llvm.org/buildbot/#/builders/152/builds/932 Fixes 6a2cc122296b04a4f09768a714a74ffc82b7be87
This commit is contained in:
parent
6a2cc12229
commit
532e639ec6
@ -66,7 +66,9 @@ function(add_flang_library name)
|
||||
llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
|
||||
|
||||
clang_target_link_libraries(${name} PRIVATE ${ARG_CLANG_LIBS})
|
||||
mlir_target_link_libraries(${name} PRIVATE ${ARG_MLIR_LIBS})
|
||||
if (ARG_MLIR_LIBS)
|
||||
mlir_target_link_libraries(${name} PRIVATE ${ARG_MLIR_LIBS})
|
||||
endif()
|
||||
|
||||
if (TARGET ${name})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user