add_td_sources(sources)
add_header_files(sources)
endif()
+
+ # Set common compiler options:
+ if( NOT LLVM_REQUIRES_EH )
+ if( CMAKE_COMPILER_IS_GNUCXX )
+ add_definitions( -fno-exceptions )
+ endif()
+ endif()
+ if( NOT LLVM_REQUIRES_RTTI )
+ if( CMAKE_COMPILER_IS_GNUCXX )
+ add_definitions( -fno-rtti )
+ endif()
+ endif()
+
set( ${OUT_VAR} ${sources} PARENT_SCOPE )
endfunction(llvm_process_sources)
set(LLVM_LINK_COMPONENTS jit nativecodegen)
+set(LLVM_REQUIRES_EH 1)
add_llvm_example(ExceptionDemo
ExceptionDemo.cpp
set(LLVM_LINK_COMPONENTS core jit interpreter native)
+set(LLVM_REQUIRES_RTTI 1)
add_llvm_example(Kaleidoscope-Ch7
toy.cpp
+## FIXME: This only requires RTTI because tblgen uses it. Fix that.
+set(LLVM_REQUIRES_RTTI 1)
+
add_llvm_library(LLVMSupport
APFloat.cpp
APInt.cpp
+set(LLVM_REQUIRES_RTTI 1)
+if( MINGW )
+ set(LLVM_REQUIRES_EH 1)
+endif()
+
add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
+set(LLVM_REQUIRES_RTTI 1)
+
add_llvm_library(LLVMCore
AsmWriter.cpp
Attributes.cpp
+set(LLVM_REQUIRES_EH 1)
+set(LLVM_REQUIRES_RTTI 1)
+
add_executable(tblgen
ARMDecoderEmitter.cpp
AsmMatcherEmitter.cpp
add_definitions("-Wno-variadic-macros")
endif()
+set(LLVM_REQUIRES_RTTI 1)
+add_definitions( -DGTEST_HAS_RTTI=0 )
+# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not
+# supported by Clang, so force googletest to use its own tuple implementation.
+add_definitions( -DGTEST_USE_OWN_TR1_TUPLE )
+
add_llvm_library(gtest
googletest/gtest.cc
googletest/gtest-death-test.cc