Allow C-API users to debug their JITed code via the GDB JIT Interface. This is currently supported on ELF and MachO based platforms. On other systems `LLVMOrcLLJITEnableDebugSupport()` returns an error. This patch adds a new C-API header `LLJITUtils.h`, which can host further advanced JIT features in the future. Using the header requires linking against LLVMOrcDebugging.
27 lines
462 B
CMake
27 lines
462 B
CMake
if( CMAKE_HOST_UNIX AND HAVE_LIBRT )
|
|
set(rt_lib rt)
|
|
endif()
|
|
|
|
add_llvm_component_library(LLVMOrcDebugging
|
|
DebugInfoSupport.cpp
|
|
DebuggerSupport.cpp
|
|
DebuggerSupportPlugin.cpp
|
|
LLJITUtilsCBindings.cpp
|
|
PerfSupportPlugin.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc/Debugging/
|
|
|
|
LINK_LIBS
|
|
${LLVM_PTHREAD_LIB}
|
|
${rt_lib}
|
|
|
|
LINK_COMPONENTS
|
|
DebugInfoDWARF
|
|
JITLink
|
|
OrcJIT
|
|
OrcShared
|
|
Support
|
|
TargetParser
|
|
)
|