Explorar o código

Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8

Chris Lattner %!s(int64=15) %!d(string=hai) anos
pai
achega
e73a31f667
Modificáronse 89 ficheiros con 126 adicións e 8 borrados
  1. 1 1
      include/llvm-c/Core.h
  2. 2 0
      lib/Analysis/IPA/Makefile
  3. 1 0
      lib/Analysis/Makefile
  4. 1 0
      lib/Archive/Makefile
  5. 1 0
      lib/AsmParser/Makefile
  6. 1 0
      lib/Bitcode/Reader/Makefile
  7. 1 0
      lib/Bitcode/Writer/Makefile
  8. 3 2
      lib/CodeGen/AsmPrinter/Makefile
  9. 1 0
      lib/CodeGen/Makefile
  10. 2 1
      lib/CodeGen/SelectionDAG/Makefile
  11. 2 0
      lib/ExecutionEngine/Interpreter/Makefile
  12. 2 0
      lib/ExecutionEngine/JIT/Makefile
  13. 1 0
      lib/ExecutionEngine/Makefile
  14. 1 0
      lib/Linker/Makefile
  15. 1 0
      lib/MC/MCParser/Makefile
  16. 1 0
      lib/MC/Makefile
  17. 1 0
      lib/Target/ARM/AsmParser/Makefile
  18. 1 0
      lib/Target/ARM/AsmPrinter/Makefile
  19. 1 0
      lib/Target/ARM/Makefile
  20. 1 0
      lib/Target/ARM/TargetInfo/Makefile
  21. 1 0
      lib/Target/Alpha/AsmPrinter/Makefile
  22. 2 0
      lib/Target/Alpha/Makefile
  23. 1 0
      lib/Target/Alpha/TargetInfo/Makefile
  24. 1 0
      lib/Target/Blackfin/AsmPrinter/Makefile
  25. 2 0
      lib/Target/Blackfin/Makefile
  26. 1 0
      lib/Target/Blackfin/TargetInfo/Makefile
  27. 1 0
      lib/Target/CBackend/Makefile
  28. 1 0
      lib/Target/CBackend/TargetInfo/Makefile
  29. 1 0
      lib/Target/CellSPU/AsmPrinter/Makefile
  30. 1 0
      lib/Target/CellSPU/Makefile
  31. 1 0
      lib/Target/CellSPU/TargetInfo/Makefile
  32. 1 0
      lib/Target/CppBackend/Makefile
  33. 1 0
      lib/Target/CppBackend/TargetInfo/Makefile
  34. 1 0
      lib/Target/MSIL/Makefile
  35. 1 0
      lib/Target/MSIL/TargetInfo/Makefile
  36. 1 0
      lib/Target/MSP430/AsmPrinter/Makefile
  37. 2 0
      lib/Target/MSP430/Makefile
  38. 1 0
      lib/Target/MSP430/TargetInfo/Makefile
  39. 1 0
      lib/Target/Makefile
  40. 1 0
      lib/Target/Mips/AsmPrinter/Makefile
  41. 2 0
      lib/Target/Mips/Makefile
  42. 1 0
      lib/Target/Mips/TargetInfo/Makefile
  43. 1 0
      lib/Target/PIC16/AsmPrinter/Makefile
  44. 2 0
      lib/Target/PIC16/Makefile
  45. 1 0
      lib/Target/PIC16/PIC16Passes/Makefile
  46. 1 0
      lib/Target/PIC16/TargetInfo/Makefile
  47. 1 0
      lib/Target/PowerPC/AsmPrinter/Makefile
  48. 2 0
      lib/Target/PowerPC/Makefile
  49. 1 0
      lib/Target/PowerPC/TargetInfo/Makefile
  50. 2 0
      lib/Target/Sparc/AsmPrinter/Makefile
  51. 2 0
      lib/Target/Sparc/Makefile
  52. 1 0
      lib/Target/Sparc/TargetInfo/Makefile
  53. 1 0
      lib/Target/SystemZ/AsmPrinter/Makefile
  54. 2 0
      lib/Target/SystemZ/Makefile
  55. 1 0
      lib/Target/SystemZ/TargetInfo/Makefile
  56. 1 0
      lib/Target/X86/AsmParser/Makefile
  57. 1 0
      lib/Target/X86/AsmPrinter/Makefile
  58. 1 0
      lib/Target/X86/Disassembler/Makefile
  59. 2 0
      lib/Target/X86/Makefile
  60. 2 0
      lib/Target/X86/TargetInfo/Makefile
  61. 1 0
      lib/Target/XCore/AsmPrinter/Makefile
  62. 2 0
      lib/Target/XCore/Makefile
  63. 2 0
      lib/Target/XCore/TargetInfo/Makefile
  64. 1 0
      lib/Transforms/Hello/Makefile
  65. 1 0
      lib/Transforms/IPO/Makefile
  66. 1 0
      lib/Transforms/InstCombine/Makefile
  67. 1 0
      lib/Transforms/Instrumentation/Makefile
  68. 1 0
      lib/Transforms/Scalar/Makefile
  69. 1 0
      lib/Transforms/Utils/Makefile
  70. 1 0
      lib/VMCore/Makefile
  71. 1 0
      tools/gold/Makefile
  72. 1 0
      tools/llc/Makefile
  73. 1 0
      tools/lli/Makefile
  74. 1 0
      tools/llvm-ar/Makefile
  75. 1 1
      tools/llvm-as/Makefile
  76. 0 1
      tools/llvm-bcanalyzer/Makefile
  77. 0 1
      tools/llvm-config/Makefile
  78. 1 1
      tools/llvm-dis/Makefile
  79. 1 0
      tools/llvm-extract/Makefile
  80. 1 0
      tools/llvm-ld/Makefile
  81. 1 0
      tools/llvm-link/Makefile
  82. 1 0
      tools/llvm-mc/Makefile
  83. 1 0
      tools/llvm-nm/Makefile
  84. 1 0
      tools/llvm-prof/Makefile
  85. 1 0
      tools/lto/Makefile
  86. 1 0
      tools/opt/Makefile
  87. 4 0
      unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
  88. 14 0
      unittests/ExecutionEngine/JIT/JITTest.cpp
  89. 5 0
      unittests/VMCore/PassManagerTest.cpp

+ 1 - 1
include/llvm-c/Core.h

@@ -1007,7 +1007,7 @@ namespace llvm {
                                                         \
     template<typename T>                                \
     inline T *unwrap(ref P) {                           \
-      T *Q = dynamic_cast<T*>(unwrap(P));               \
+      T *Q = (T*)unwrap(P);                             \
       assert(Q && "Invalid cast!");                     \
       return Q;                                         \
     }

+ 2 - 0
lib/Analysis/IPA/Makefile

@@ -10,5 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMipa
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
+
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Analysis/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../..
 LIBRARYNAME = LLVMAnalysis
 DIRS = IPA
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Archive/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../..
 LIBRARYNAME = LLVMArchive
+CXXFLAGS = -fno-rtti
 
 # We only want an archive so only those modules actually used by a tool are
 # included.

+ 1 - 0
lib/AsmParser/Makefile

@@ -10,5 +10,6 @@
 LEVEL = ../..
 LIBRARYNAME := LLVMAsmParser
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
lib/Bitcode/Reader/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMBitReader
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Bitcode/Writer/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMBitWriter
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 3 - 2
lib/CodeGen/AsmPrinter/Makefile

@@ -1,4 +1,4 @@
-##===- lib/CodeGen/SelectionDAG/Makefile -------------------*- Makefile -*-===##
+##===- lib/CodeGen/AsmPrinter/Makefile ---------------------*- Makefile -*-===##
 #
 #                     The LLVM Compiler Infrastructure
 #
@@ -6,8 +6,9 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMAsmPrinter
-PARALLEL_DIRS =
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
lib/CodeGen/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../..
 LIBRARYNAME = LLVMCodeGen
 PARALLEL_DIRS = SelectionDAG AsmPrinter
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 2 - 1
lib/CodeGen/SelectionDAG/Makefile

@@ -6,8 +6,9 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMSelectionDAG
-PARALLEL_DIRS =
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 2 - 0
lib/ExecutionEngine/Interpreter/Makefile

@@ -6,7 +6,9 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMInterpreter
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 2 - 0
lib/ExecutionEngine/JIT/Makefile

@@ -6,8 +6,10 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMJIT
+CXXFLAGS = -fno-rtti
 
 # Get the $(ARCH) setting
 include $(LEVEL)/Makefile.config

+ 1 - 0
lib/ExecutionEngine/Makefile

@@ -9,5 +9,6 @@
 LEVEL = ../..
 LIBRARYNAME = LLVMExecutionEngine
 PARALLEL_DIRS = Interpreter JIT
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
lib/Linker/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../..
 LIBRARYNAME = LLVMLinker
 BUILD_ARCHIVE := 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/MC/MCParser/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMMCParser
 BUILD_ARCHIVE := 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/MC/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../..
 LIBRARYNAME = LLVMMC
 BUILD_ARCHIVE := 1
 PARALLEL_DIRS := MCParser
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Target/ARM/AsmParser/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMARMAsmParser
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' ARM target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/ARM/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMARMAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' arm target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/ARM/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMARMCodeGen
 TARGET = ARM
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = ARMGenRegisterInfo.h.inc ARMGenRegisterNames.inc \

+ 1 - 0
lib/Target/ARM/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMARMInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/Alpha/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMAlphaAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' alpha target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/Alpha/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMAlphaCodeGen
 TARGET = Alpha
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = AlphaGenRegisterInfo.h.inc AlphaGenRegisterNames.inc \

+ 1 - 0
lib/Target/Alpha/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMAlphaInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/Blackfin/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMBlackfinAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' Blackfin target directory to grab private
 # headers

+ 2 - 0
lib/Target/Blackfin/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMBlackfinCodeGen
 TARGET = Blackfin
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = BlackfinGenRegisterInfo.h.inc BlackfinGenRegisterNames.inc \

+ 1 - 0
lib/Target/Blackfin/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMBlackfinInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/CBackend/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../..
 LIBRARYNAME = LLVMCBackend
+CXXFLAGS = -fno-rtti
 
 DIRS = TargetInfo
 

+ 1 - 0
lib/Target/CBackend/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMCBackendInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/CellSPU/AsmPrinter/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../../..
 LIBRARYNAME = LLVMCellSPUAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' CellSPU target directory to grab
 # private headers

+ 1 - 0
lib/Target/CellSPU/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMCellSPUCodeGen
 TARGET = SPU
+CXXFLAGS = -fno-rtti
 
 BUILT_SOURCES = SPUGenInstrNames.inc SPUGenRegisterNames.inc \
 		SPUGenAsmWriter.inc SPUGenCodeEmitter.inc \

+ 1 - 0
lib/Target/CellSPU/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMCellSPUInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/CppBackend/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../..
 LIBRARYNAME = LLVMCppBackend
+CXXFLAGS = -fno-rtti
 
 DIRS = TargetInfo
 

+ 1 - 0
lib/Target/CppBackend/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMCppBackendInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/MSIL/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../..
 LIBRARYNAME = LLVMMSIL
+CXXFLAGS = -fno-rtti
 
 DIRS = TargetInfo
 

+ 1 - 0
lib/Target/MSIL/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMMSILInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/MSP430/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMMSP430AsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' MSP430 target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/MSP430/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMMSP430CodeGen
 TARGET = MSP430
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = MSP430GenRegisterInfo.h.inc MSP430GenRegisterNames.inc \

+ 1 - 0
lib/Target/MSP430/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMMSP430Info
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../..
 LIBRARYNAME = LLVMTarget
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 # We include this early so we can access the value of TARGETS_TO_BUILD as the
 # value for PARALLEL_DIRS which must be set before Makefile.rules is included

+ 1 - 0
lib/Target/Mips/AsmPrinter/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../../..
 LIBRARYNAME = LLVMMipsAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' Mips target directory to grab
 # private headers

+ 2 - 0
lib/Target/Mips/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMMipsCodeGen
 TARGET = Mips
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = MipsGenRegisterInfo.h.inc MipsGenRegisterNames.inc \

+ 1 - 0
lib/Target/Mips/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMMipsInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/PIC16/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMPIC16AsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' pic16 target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/PIC16/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMPIC16CodeGen
 TARGET = PIC16
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = PIC16GenRegisterInfo.h.inc PIC16GenRegisterNames.inc \

+ 1 - 0
lib/Target/PIC16/PIC16Passes/Makefile

@@ -10,6 +10,7 @@ LEVEL = ../../../..
 TARGET = PIC16
 LIBRARYNAME = LLVMpic16passes
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Target/PIC16/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMPIC16Info
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/PowerPC/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMPowerPCAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' PowerPC target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/PowerPC/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMPowerPCCodeGen
 TARGET = PPC
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = PPCGenInstrNames.inc PPCGenRegisterNames.inc \

+ 1 - 0
lib/Target/PowerPC/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMPowerPCInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/Sparc/AsmPrinter/Makefile

@@ -8,6 +8,8 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMSparcAsmPrinter
+CXXFLAGS = -fno-rtti
+
 
 # Hack: we need to include 'main' Sparc target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/Sparc/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMSparcCodeGen
 TARGET = Sparc
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = SparcGenRegisterInfo.h.inc SparcGenRegisterNames.inc \

+ 1 - 0
lib/Target/Sparc/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMSparcInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/SystemZ/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMSystemZAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' SystemZ target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/SystemZ/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMSystemZCodeGen
 TARGET = SystemZ
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = SystemZGenRegisterInfo.h.inc SystemZGenRegisterNames.inc \

+ 1 - 0
lib/Target/SystemZ/TargetInfo/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMSystemZInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/X86/AsmParser/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMX86AsmParser
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' x86 target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/X86/AsmPrinter/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../../..
 LIBRARYNAME = LLVMX86AsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' x86 target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/X86/Disassembler/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../../..
 LIBRARYNAME = LLVMX86Disassembler
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' x86 target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/X86/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMX86CodeGen
 TARGET = X86
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \

+ 2 - 0
lib/Target/X86/TargetInfo/Makefile

@@ -6,8 +6,10 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../../..
 LIBRARYNAME = LLVMX86Info
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Target/XCore/AsmPrinter/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../../../..
 LIBRARYNAME = LLVMXCoreAsmPrinter
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' XCore target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 2 - 0
lib/Target/XCore/Makefile

@@ -6,9 +6,11 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../..
 LIBRARYNAME = LLVMXCoreCodeGen
 TARGET = XCore
+CXXFLAGS = -fno-rtti
 
 # Make sure that tblgen is run, first thing.
 BUILT_SOURCES = XCoreGenRegisterInfo.h.inc XCoreGenRegisterNames.inc \

+ 2 - 0
lib/Target/XCore/TargetInfo/Makefile

@@ -6,8 +6,10 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
+
 LEVEL = ../../../..
 LIBRARYNAME = LLVMXCoreInfo
+CXXFLAGS = -fno-rtti
 
 # Hack: we need to include 'main' target directory to grab private headers
 CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

+ 1 - 0
lib/Transforms/Hello/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../../..
 LIBRARYNAME = LLVMHello
 LOADABLE_MODULE = 1
 USEDLIBS =
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Transforms/IPO/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMipo
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Transforms/InstCombine/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMInstCombine
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Transforms/Instrumentation/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMInstrumentation
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Transforms/Scalar/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMScalarOpts
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/Transforms/Utils/Makefile

@@ -10,6 +10,7 @@
 LEVEL = ../../..
 LIBRARYNAME = LLVMTransformUtils
 BUILD_ARCHIVE = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 0
lib/VMCore/Makefile

@@ -9,6 +9,7 @@
 LEVEL = ../..
 LIBRARYNAME = LLVMCore
 BUILD_ARCHIVE = 1
+#CXXFLAGS = -fno-rtti
 
 BUILT_SOURCES = $(PROJ_OBJ_ROOT)/include/llvm/Intrinsics.gen
 

+ 1 - 0
tools/gold/Makefile

@@ -19,6 +19,7 @@ LINK_LIBS_IN_SHARED=1
 SHARED_LIBRARY = 1
 BUILD_ARCHIVE = 0
 LOADABLE_MODULE = 1
+CXXFLAGS = -fno-rtti
 
 LINK_COMPONENTS := support system
 LIBS += -llto

+ 1 - 0
tools/llc/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL = ../..
 TOOLNAME = llc
+CXXFLAGS = -fno-rtti
 
 # Include this here so we can get the configuration of the targets
 # that have been configured for construction. We have to do this 

+ 1 - 0
tools/lli/Makefile

@@ -9,6 +9,7 @@
 
 LEVEL    := ../..
 TOOLNAME := lli
+CXXFLAGS = -fno-rtti
 LINK_COMPONENTS := jit interpreter nativecodegen bitreader selectiondag
 
 # Enable JIT support

+ 1 - 0
tools/llvm-ar/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../..
 TOOLNAME = llvm-ar
 LINK_COMPONENTS = archive
 REQUIRES_EH := 1
+#CXXFLAGS = -fno-rtti
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 1 - 1
tools/llvm-as/Makefile

@@ -10,7 +10,7 @@
 LEVEL = ../..
 TOOLNAME = llvm-as
 LINK_COMPONENTS := asmparser bitwriter
-REQUIRES_EH := 1
+CXXFLAGS = -fno-rtti
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 0 - 1
tools/llvm-bcanalyzer/Makefile

@@ -10,7 +10,6 @@ LEVEL = ../..
 
 TOOLNAME = llvm-bcanalyzer
 LINK_COMPONENTS := bitreader
-REQUIRES_EH := 1
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 0 - 1
tools/llvm-config/Makefile

@@ -10,7 +10,6 @@
 LEVEL = ../..
 
 EXTRA_DIST = LibDeps.txt FinalLibDeps.txt llvm-config.in.in find-cycles.pl
-REQUIRES_EH := 1
 
 include $(LEVEL)/Makefile.common
 

+ 1 - 1
tools/llvm-dis/Makefile

@@ -10,7 +10,7 @@ LEVEL = ../..
 
 TOOLNAME = llvm-dis
 LINK_COMPONENTS := bitreader
-REQUIRES_EH := 1
+CXXFLAGS = -fno-rtti
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 1 - 0
tools/llvm-extract/Makefile

@@ -11,6 +11,7 @@ LEVEL = ../..
 
 TOOLNAME = llvm-extract
 LINK_COMPONENTS := ipo bitreader bitwriter asmparser
+CXXFLAGS = -fno-rtti
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 1 - 0
tools/llvm-ld/Makefile

@@ -11,5 +11,6 @@ LEVEL = ../..
 
 TOOLNAME = llvm-ld
 LINK_COMPONENTS = ipo scalaropts linker archive bitwriter
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
tools/llvm-link/Makefile

@@ -10,6 +10,7 @@ LEVEL = ../..
 
 TOOLNAME = llvm-link
 LINK_COMPONENTS = linker bitreader bitwriter asmparser
+CXXFLAGS = -fno-rtti
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

+ 1 - 0
tools/llvm-mc/Makefile

@@ -13,6 +13,7 @@ TOOLNAME = llvm-mc
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
 NO_INSTALL = 1
+CXXFLAGS = -fno-rtti
 
 # Include this here so we can get the configuration of the targets
 # that have been configured for construction. We have to do this 

+ 1 - 0
tools/llvm-nm/Makefile

@@ -13,5 +13,6 @@ LINK_COMPONENTS = archive bitreader
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
tools/llvm-prof/Makefile

@@ -13,5 +13,6 @@ LINK_COMPONENTS = bitreader analysis
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
+CXXFLAGS = -fno-rtti
 
 include $(LEVEL)/Makefile.common

+ 1 - 0
tools/lto/Makefile

@@ -17,6 +17,7 @@ include $(LEVEL)/Makefile.config
 
 LINK_LIBS_IN_SHARED = 1
 SHARED_LIBRARY = 1
+CXXFLAGS = -fno-rtti
 
 LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bitreader bitwriter
 

+ 1 - 0
tools/opt/Makefile

@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 TOOLNAME = opt
+CXXFLAGS = -fno-rtti
 
 LINK_COMPONENTS := bitreader bitwriter asmparser instrumentation scalaropts ipo
 

+ 4 - 0
unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp

@@ -23,6 +23,9 @@
 
 using namespace llvm;
 
+int dummy;
+
+#if 0
 namespace {
 
 struct FunctionEmittedEvent {
@@ -235,3 +238,4 @@ testing::Environment* const jit_env =
   testing::AddGlobalTestEnvironment(new JITEnvironment);
 
 }  // anonymous namespace
+#endif

+ 14 - 0
unittests/ExecutionEngine/JIT/JITTest.cpp

@@ -58,6 +58,7 @@ std::string DumpFunction(const Function *F) {
   return Result;
 }
 
+#if 0
 class RecordingJITMemoryManager : public JITMemoryManager {
   const OwningPtr<JITMemoryManager> Base;
 public:
@@ -178,6 +179,7 @@ public:
     return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister);
   }
 };
+#endif
 
 bool LoadAssemblyInto(Module *M, const char *assembly) {
   SMDiagnostic Error;
@@ -195,11 +197,15 @@ class JITTest : public testing::Test {
   virtual void SetUp() {
     M = new Module("<main>", Context);
     MP = new ExistingModuleProvider(M);
+#if 0
     RJMM = new RecordingJITMemoryManager;
     RJMM->setPoisonMemory(true);
+#endif
     std::string Error;
     TheJIT.reset(EngineBuilder(MP).setEngineKind(EngineKind::JIT)
+#if 0
                  .setJITMemoryManager(RJMM)
+#endif
                  .setErrorStr(&Error).create());
     ASSERT_TRUE(TheJIT.get() != NULL) << Error;
   }
@@ -211,7 +217,9 @@ class JITTest : public testing::Test {
   LLVMContext Context;
   Module *M;  // Owned by MP.
   ModuleProvider *MP;  // Owned by ExecutionEngine.
+#if 0
   RecordingJITMemoryManager *RJMM;
+#endif
   OwningPtr<ExecutionEngine> TheJIT;
 };
 
@@ -430,6 +438,7 @@ TEST_F(JITTest, ModuleDeletion) {
   TheJIT->getPointerToFunction(func);
   TheJIT->deleteModuleProvider(MP);
 
+#if 0
   SmallPtrSet<const void*, 2> FunctionsDeallocated;
   for (unsigned i = 0, e = RJMM->deallocateFunctionBodyCalls.size();
        i != e; ++i) {
@@ -463,6 +472,7 @@ TEST_F(JITTest, ModuleDeletion) {
   }
   EXPECT_EQ(RJMM->startExceptionTableCalls.size(),
             NumTablesDeallocated);
+#endif
 }
 
 // ARM and PPC still emit stubs for calls since the target may be too far away
@@ -497,14 +507,18 @@ TEST_F(JITTest, NoStubs) {
 
   // We should now allocate no more stubs, we have the code to foo
   // and the existing stub for bar.
+#if 0
   int stubsBefore = RJMM->stubsAllocated;
+#endif
   Function *func = M->getFunction("main");
   TheJIT->getPointerToFunction(func);
 
   Function *bar = M->getFunction("bar");
   TheJIT->getPointerToFunction(bar);
 
+#if 0
   ASSERT_EQ(stubsBefore, RJMM->stubsAllocated);
+#endif
 }
 #endif  // !ARM && !PPC
 

+ 5 - 0
unittests/VMCore/PassManagerTest.cpp

@@ -32,6 +32,10 @@
 #include "llvm/Assembly/PrintModulePass.h"
 #include "gtest/gtest.h"
 
+int dummy;
+
+#if 0
+
 namespace llvm {
   namespace {
     // ND = no deps
@@ -525,3 +529,4 @@ namespace llvm {
 
   }
 }
+#endif