mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:29:51 +00:00
Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
This commit is contained in:
parent
5fcaab5d0e
commit
a6ffccab95
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user