[llvm-dev] REQUIRES_RTTI usage

140 views
Skip to first unread message

Viktor Was BSc via llvm-dev

unread,
Mar 20, 2019, 10:11:58 AM3/20/19
to llvm...@lists.llvm.org
Hi all,

I've built clang 6.0.1 from source and I'm working on a clang plugin.

I'm confused about the usage of REQUIRES_RTTI.
the cmake flag LLVM_ENABLE_RTTI is used to generate llvm/clang build files with/without rtti.
When is REQUIRES_RTTI supposed to be used and how? When building llvm/clang or when using clang to build regular software that relies on rtti? Do I have to pass it to eg. ninja or cmake? If cmake, why have REQUIRES_RTTI and LLVM_ENABLE_RTTI?
I've also seen LLVM_REQUIRES_RTTI in the llvm/lib/Transforms/Hello/CMakeLists.txt...

My concrete problem is with loading a plugin which contains an llvm::cl::opt. (unresolved symbol for vtable to llvm::cl::parser).
I don't understand why it's not working.
llvm/clang are built without rtti (LLVM_ENABLE_RTTI=OFF) and the plugin is also built with -fno-rtti and has only dependencies to llvm libs and std headers (#include <numeric>).

Cheers,
Viktor
Reply all
Reply to author
Forward
0 new messages