Adrien DEGRANGE via llvm-dev
2015-Dec-02 15:20 UTC
[llvm-dev] -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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151202/203074fc/attachment.html>
On 2 Dec 2015, at 15:20, Adrien DEGRANGE via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > This sounds annoying… Has anyone already encountered such an issue? How did you manage with that?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
Adrien DEGRANGE via llvm-dev
2015-Dec-03 11:10 UTC
[llvm-dev] -fno-rtti compilation option
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----- De : Dr D. Chisnall [mailto:dc552 at hermes.cam.ac.uk] De la part de David Chisnall Envoyé : mercredi 2 décembre 2015 16:23 À : Adrien DEGRANGE <adegrange at invoke.fr> Cc : llvm-dev at lists.llvm.org Objet : Re: [llvm-dev] -fno-rtti compilation option On 2 Dec 2015, at 15:20, Adrien DEGRANGE via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > This sounds annoying… Has anyone already encountered such an issue? How did you manage with that?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