[Lldb-commits] [review request] move cxa_demangle.cpp to another directory to avoid gcc/rtti errors
Malea, Daniel
daniel.malea at intel.com
Wed Dec 5 15:13:33 PST 2012
Hi all,
As I'm trying to fix the gcc build, I ran into some trouble with source/Core/cxa_demangle.cpp: as it uses dynamic_cast<>, gcc complains if it is compiled with -fno-rtti.
I'm afraid I couldn't find any (non-hacky) way to change the compile flags for just that one file. I see two ways to fix the problem "correctly":
1. Define REQUIRES_RTTI = 1 in source/Core/Makefile, thereby compiling many more files with -rtti than actually need it. It fixes the build, but is not ideal.
2. Move cxa_demangle.cpp to another directory (I propose "source/Demangle" thereby creating a new static library "liblldbDemangle.a") and set the required RTTI options for just that one directory.
What does the mailing list think? The attached patch implements option 2 above, and also fixes lib/Makefile to correctly include libclangRewriteCore.a and libclangRewriteFrontend.a as those are apparently required...
Cheers,
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move_cxa_demangle.patch
Type: application/octet-stream
Size: 692343 bytes
Desc: move_cxa_demangle.patch
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121205/90c2cd3f/attachment.obj>
More information about the lldb-commits
mailing list