[llvm-dev] A question about conditional dependence between components in LLVMBuild.txt
Pranav Bhandarkar via llvm-dev
llvm-dev at lists.llvm.org
Thu Sep 24 11:17:28 PDT 2020
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200924/2b7dbcca/attachment.html>
More information about the llvm-dev
mailing list