1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-04-15 13:40:33 +00:00

Build with RTTI and exceptions disabled. Only in GCC for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Oscar Fuentes 2010-10-17 02:26:16 +00:00
parent d56d61af01
commit f0c55a9b97
8 changed files with 34 additions and 0 deletions
cmake/modules
examples
ExceptionDemo
Kaleidoscope/Chapter7
lib
utils

@ -36,6 +36,19 @@ function(llvm_process_sources OUT_VAR)
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)

@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS jit nativecodegen)
set(LLVM_REQUIRES_EH 1)
add_llvm_example(ExceptionDemo
ExceptionDemo.cpp

@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS core jit interpreter native)
set(LLVM_REQUIRES_RTTI 1)
add_llvm_example(Kaleidoscope-Ch7
toy.cpp

@ -1,3 +1,6 @@
## FIXME: This only requires RTTI because tblgen uses it. Fix that.
set(LLVM_REQUIRES_RTTI 1)
add_llvm_library(LLVMSupport
APFloat.cpp
APInt.cpp

@ -1,3 +1,8 @@
set(LLVM_REQUIRES_RTTI 1)
if( MINGW )
set(LLVM_REQUIRES_EH 1)
endif()
add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp

@ -1,3 +1,5 @@
set(LLVM_REQUIRES_RTTI 1)
add_llvm_library(LLVMCore
AsmWriter.cpp
Attributes.cpp

@ -1,3 +1,6 @@
set(LLVM_REQUIRES_EH 1)
set(LLVM_REQUIRES_RTTI 1)
add_executable(tblgen
ARMDecoderEmitter.cpp
AsmMatcherEmitter.cpp

@ -24,6 +24,12 @@ if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
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