diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2010-10-17 02:26:16 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2010-10-17 02:26:16 +0000 |
commit | f0c55a9b9797855a4c488c7a6a97d336a5bafd8e (patch) | |
tree | 6e4ef374b23b14db2199b461e21322b316061515 /cmake | |
parent | d56d61af0190ee8024eb71dd4138ed7861f20adc (diff) | |
download | external_llvm-f0c55a9b9797855a4c488c7a6a97d336a5bafd8e.zip external_llvm-f0c55a9b9797855a4c488c7a6a97d336a5bafd8e.tar.gz external_llvm-f0c55a9b9797855a4c488c7a6a97d336a5bafd8e.tar.bz2 |
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
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/LLVMProcessSources.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake index b753735..a71c6f2 100644 --- a/cmake/modules/LLVMProcessSources.cmake +++ b/cmake/modules/LLVMProcessSources.cmake @@ -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) |