[Lldb-commits] [review request] move cxa_demangle.cpp to another directory to avoid gcc/rtti errors

Greg Clayton gclayton at apple.com
Thu Dec 6 10:14:30 PST 2012

Option #3: there are only two dynamic_casts and both of them can be static_casts. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: static.patch
Type: application/octet-stream
Size: 1039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121206/4c8a79f9/attachment.obj>
-------------- next part --------------

Try this out.

On Dec 5, 2012, at 3:13 PM, "Malea, Daniel" <daniel.malea at intel.com> wrote:

> 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
> <move_cxa_demangle.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

More information about the lldb-commits mailing list