From f0c55a9b9797855a4c488c7a6a97d336a5bafd8e Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Sun, 17 Oct 2010 02:26:16 +0000 Subject: 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 --- cmake/modules/LLVMProcessSources.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cmake') 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) -- cgit v1.1