-fno-rtti compilation option

Hi all,

Sorry to bother you guys with this question coming from a young beginner, but even after some hours of research, I could not find any way to solve my issue…

I have a project using LLVM APIs (3.7.0), so I compile it with options suggested by ‘llvm-config –cxxflags’, including -fno-rtti. Without this latter option, the build fails (“no reference to typeinfo…”).

However, I also test my code thanks to CppUnit, which does not allow this compilation option (since it uses some functions such as ‘typeid’).

This sounds annoying… Has anyone already encountered such an issue? How did you manage with that?

Thanks a lot in advance!

Yours, sincerely,

AD

I found this issue, but it was too late to get a fix in to 3.7. The issue is that a number of classes in public headers don’t have an anchor method and so get emitted in every compilation unit, and their vtable refers to the type_info in the superclass (if that compilation unit has RTTI enabled), which doesn’t exist.

The work-around that we use is to build LLVM with RTTI enabled.

David

Hi David,

Thanks a lot for your answer, I got it!

I'll try this workaround asap.

Have a great day,

AD

Adrien Dégrange
Recherche & Développement
invoke-software.fr

Adopter l'éco-attitude. N'imprimez ce message qu'en cas de nécessité.

Ce message électronique, y compris les fichiers joints, est confidentiel et destiné exclusivement à l'usage de la personne à laquelle il est adressé. Si vous avez reçu ce message par erreur, merci de me le signaler et de le détruire. Toute diffusion, publication, totale ou partielle ou divulgation sous quelque forme que ce soit, non expressément autorisée de ce message, est interdite.

-----Message d'origine-----