Hi,
I presume there isn’t a way of conditionally adding a dependency (in required_libraries) for a component based on the targets built. Am I right?
I want to be able to do something like – “runtimedyld require hexagoncodegen if the Hexagon target has been enabled”
For simply building runtimedyld, I am doing the following in llvm-project / llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt.
if ("${LLVM_TARGETS_TO_BUILD}" MATCHES “Hexagon”)
add_definitions(-DHEXAGON_TARGET_ENABLED)
target_link_libraries(LLVMRuntimeDyld PRIVATE LLVMHexagonCodeGen)
endif()
But, in my case this is not enough because llvm-config is oblivious of this dependency because it is not expressed in LLVMBuild.txt in RuntimeDyld.
FWIW, The Halide makefile uses llvm-config to, among other things, compute a link line for the Halide library itself.
Is there a way then to add a conditional dependency that llvm-build can deal with?
Thanks,
Pranav