Revert unittests build changes temporarily, the unit test build isn't -j safe.
[oota-llvm.git] / Makefile.rules
index 014d6973cf06799bc5aa06ebe116efa5c040f7c3..8d1e621845a03bc0fa6fed0b1f36a0e587ec7a8d 100644 (file)
@@ -343,9 +343,10 @@ ifdef REQUIRES_FRAME_POINTER
   LD.Flags  := $(filter-out -fomit-frame-pointer,$(LD.Flags))
 endif
 
-# IF REQUIRES_RTTI=1 is specified then don't disable run-time type id
-ifndef REQUIRES_RTTI
-  CXX.Flags += -fno-rtti
+# If REQUIRES_RTTI=1 is specified then don't disable run-time type id.
+ifeq ($(REQUIRES_RTTI), 1)
+  CXX.Flags := $(filter-out -fno-rtti,$(CXX.Flags))
+  CXXFLAGS := $(filter-out -fno-rtti,$(CXXFLAGS))
 endif
 
 ifdef ENABLE_COVERAGE