[llvm-dev] ORC-JIT Missing Typeinfo
Justin Bogner via llvm-dev
llvm-dev at lists.llvm.org
Wed Nov 14 09:08:17 PST 2018
Harry Wagstaff via llvm-dev <llvm-dev at lists.llvm.org> writes:
> I have a software project which is using the ORC JIT system. While
> upgrading from LLVM 6 (first to 7.0.0, and then to SVN), I've encountered
> some missing typeinfo link errors, even when linking against all LLVM
> libraries:
>
> ../dist/lib/libarchsim-core.so: undefined reference to `typeinfo for
> llvm::LegacyJITSymbolResolver'
> ../dist/lib/libarchsim-core.so: undefined reference to `typeinfo for
> llvm::orc::SymbolResolver'
>
> Should I not be using these classes? Am I missing a library or dependency?
> Have I miscompiled LLVM?
LLVM is compiled without run-time type information by default (ie, with
-fno-rtti). I'm guessing you've built the project that's linking to llvm
with RTTI, so it has references to typeinfo that LLVM isn't providing.
The simplest ways to work around this are probably to either build your
project without rtti, or to build llvm with it. I believe the cmake flag
is -DLLVM_ENABLE_RTTI or so.
More information about the llvm-dev
mailing list