summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2013-02-15 02:36:40 +0000
committerFilipe Cabecinhas <me@filcab.net>2013-02-15 02:36:40 +0000
commit2f4ed2a8df1d4fb8c536c2f3b9de964ca9210866 (patch)
tree4b4fb85be4239f5b7be6cb6ba96c7be4bb6984d8
parent299c0c1c09ba8661cf58f8b5b11c5f69975645a5 (diff)
downloadbcm5719-llvm-2f4ed2a8df1d4fb8c536c2f3b9de964ca9210866.tar.gz
bcm5719-llvm-2f4ed2a8df1d4fb8c536c2f3b9de964ca9210866.zip
Only enable RTTI for cxa_demangle.cpp
If testing on Linux+clang proves it needs RTTI, wa can remove the conditionals. llvm-svn: 175242
-rw-r--r--lldb/source/Core/Makefile13
-rw-r--r--lldb/source/DataFormatters/Makefile11
-rw-r--r--lldb/source/Utility/Makefile7
3 files changed, 7 insertions, 24 deletions
diff --git a/lldb/source/Core/Makefile b/lldb/source/Core/Makefile
index 5278dc5fece..78b7e3d5dde 100644
--- a/lldb/source/Core/Makefile
+++ b/lldb/source/Core/Makefile
@@ -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
diff --git a/lldb/source/DataFormatters/Makefile b/lldb/source/DataFormatters/Makefile
index 465f889f48e..4eb3249e5a5 100644
--- a/lldb/source/DataFormatters/Makefile
+++ b/lldb/source/DataFormatters/Makefile
@@ -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
diff --git a/lldb/source/Utility/Makefile b/lldb/source/Utility/Makefile
index 3997da31baf..13bcd8376c2 100644
--- a/lldb/source/Utility/Makefile
+++ b/lldb/source/Utility/Makefile
@@ -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
OpenPOWER on IntegriCloud