[ORC] Ensure that llvm_orc_registerJITLoaderGDBAllocAction is linked into tools.
authorLang Hames <lhames@gmail.com>
Thu, 4 Aug 2022 00:42:17 +0000 (17:42 -0700)
committerLang Hames <lhames@gmail.com>
Thu, 4 Aug 2022 00:51:45 +0000 (17:51 -0700)
commitb5f76d83ff8b57b2a6e4897beb388837803643da
tree8f5ad6875df765a0d7fc61fd903a980955cf07fc
parent4229d2788b6eee3dee4c123455e7ca26371c611c
[ORC] Ensure that llvm_orc_registerJITLoaderGDBAllocAction is linked into tools.

Add a reference to llvm_orc_registerJITLoaderGDBAllocAction from the
linkComponents function in the lli, llvm-jitlink, and llvm-jitlink-executor
tools. This ensures that llvm_orc_registerJITLoaderGDBAllocAction is not
dead-stripped in optimized builds, which may cause failures in these tools.

The llvm_orc_registerJITLoaderGDBAllocAction function was originally added with
MachO debugging support in 69be352a1961a, but that patch failed to update the
linkComponents functions.

http://llvm.org/PR56817
llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h
llvm/tools/lli/lli.cpp
llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp