[Lldb-commits] [lldb] r175242 - Only enable RTTI for cxa_demangle.cpp

Filipe Cabecinhas me at filcab.net
Thu Feb 14 18:36:40 PST 2013


Author: filcab
Date: Thu Feb 14 20:36:40 2013
New Revision: 175242

URL: http://llvm.org/viewvc/llvm-project?rev=175242&view=rev
Log:
Only enable RTTI for cxa_demangle.cpp

If testing on Linux+clang proves it needs RTTI, wa can remove the
conditionals.

Modified:
    lldb/trunk/source/Core/Makefile
    lldb/trunk/source/DataFormatters/Makefile
    lldb/trunk/source/Utility/Makefile

Modified: lldb/trunk/source/Core/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Makefile?rev=175242&r1=175241&r2=175242&view=diff
==============================================================================
--- lldb/trunk/source/Core/Makefile (original)
+++ lldb/trunk/source/Core/Makefile Thu Feb 14 20:36:40 2013
@@ -11,15 +11,16 @@ LLDB_LEVEL := ../..
 LIBRARYNAME := lldbCore
 BUILD_ARCHIVE = 1
 
+include $(LLDB_LEVEL)/Makefile
+
 # Enable RTTI on GCC builds because one source file in this directory
 # (cxa_demangle.cpp) uses dynamic_cast<> and GCC (at least 4.6 and 4.7)
-# complain if we try to compile it with -fno-rtti. This is somewhat of a
-# kludge because it forces us to enable RTTI in liblldbUtility.a and also
-# link in additional clang static libraries to resolve vtable references,
-# but actually has negligible impact on (shard object) file size.
+# complain if we try to compile it with -fno-rtti.
 $(info shell basename CXX is $(shell basename $(CXX)))
 ifeq (g++,$(shell basename $(CXX)))
-  REQUIRES_RTTI = 1
+$(ObjDir)/cxa_demangle.o: Compile.CXX := $(filter-out -fno-rtti,$(Compile.CXX)) -frtti
 endif
 
-include $(LLDB_LEVEL)/Makefile
+ifeq (Darwin,$(shell uname -s))
+$(ObjDir)/cxa_demangle.o: Compile.CXX := $(filter-out -fno-rtti,$(Compile.CXX)) -frtti
+endif

Modified: lldb/trunk/source/DataFormatters/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/Makefile?rev=175242&r1=175241&r2=175242&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/Makefile (original)
+++ lldb/trunk/source/DataFormatters/Makefile Thu Feb 14 20:36:40 2013
@@ -11,15 +11,4 @@ LLDB_LEVEL := ../..
 LIBRARYNAME := lldbDataFormatters
 BUILD_ARCHIVE = 1
 
-# Enable RTTI on GCC builds because one source file in this directory
-# (cxa_demangle.cpp) uses dynamic_cast<> and GCC (at least 4.6 and 4.7)
-# complain if we try to compile it with -fno-rtti. This is somewhat of a
-# kludge because it forces us to enable RTTI in liblldbUtility.a and also
-# link in additional clang static libraries to resolve vtable references,
-# but actually has negligible impact on (shard object) file size.
-$(info shell basename CXX is $(shell basename $(CXX)))
-ifeq (g++,$(shell basename $(CXX)))
-  REQUIRES_RTTI = 1
-endif
-
 include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Utility/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Makefile?rev=175242&r1=175241&r2=175242&view=diff
==============================================================================
--- lldb/trunk/source/Utility/Makefile (original)
+++ lldb/trunk/source/Utility/Makefile Thu Feb 14 20:36:40 2013
@@ -12,11 +12,4 @@ LIBRARYNAME := lldbUtility
 BUILD_ARCHIVE = 1
 NO_PEDANTIC = 1
 
-# Enable RTTI on GCC builds because liblldbCore.a requires RTTI.
-# See source/Core/Makefile for details.
-ifeq (g++,$(shell basename $(CXX)))
-  REQUIRES_RTTI = 1
-endif
-
-
 include $(LLDB_LEVEL)/Makefile





More information about the lldb-commits mailing list