[Lldb-commits] [PATCH] D31367: Expression: add missing linkage to RuntimeDyld component
Michał Górny via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 31 02:14:06 PDT 2017
On czw, 2017-03-30 at 13:55 -0700, Chris Bieneman wrote:
> I had a talk with Lang about the ExecutionEngine library structuring, and it sounds like there are some problems there that need to be worked out.
>
> Luckily for this specific case, I think the solution is actually quite simple:
>
> ```
> diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
> index f68337c..cc99f94 100644
> --- a/include/llvm/ExecutionEngine/ExecutionEngine.h
> +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
> @@ -15,7 +15,6 @@
> #ifndef LLVM_EXECUTIONENGINE_EXECUTIONENGINE_H
> #define LLVM_EXECUTIONENGINE_EXECUTIONENGINE_H
>
> -#include "RuntimeDyld.h"
> #include "llvm-c/ExecutionEngine.h"
> #include "llvm/ADT/SmallVector.h"
> #include "llvm/ADT/StringRef.h"
> @@ -49,6 +48,7 @@ class ObjectCache;
> class RTDyldMemoryManager;
> class Triple;
> class Type;
> +class JITSymbolResolver;
>
> namespace object {
> class Archive;
> ```
>
> It seems to me that there is no reason why ExecutionEngine.h needs to include RuntimeDyld.h. a forward declaration of the JITSymbolResolver class will suffice.
>
This does not solve the problem:
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):IRExecutionUnit.cpp:function llvm::RTDyldMemoryManager::deregisterEHFrames(unsigned char*, unsigned long, unsigned long): error: undefined reference to 'llvm::RTDyldMemoryManager::deregisterEHFramesInProcess(unsigned char*, unsigned long)'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):IRExecutionUnit.cpp:vtable for lldb_private::IRExecutionUnit::MemoryManager: error: undefined reference to 'llvm::RuntimeDyld::MemoryManager::anchor()'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):IRExecutionUnit.cpp:vtable for lldb_private::IRExecutionUnit::MemoryManager: error: undefined reference to 'llvm::JITSymbolResolver::anchor()'
collect2: error: ld returned 1 exit status
--
Best regards,
Michał Górny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170331/326e7863/attachment.sig>
More information about the lldb-commits
mailing list