[LLVMdev] LLVM use of C++ exceptions and RTTI
Óscar Fuentes
ofv at wanadoo.es
Thu Oct 14 15:48:00 PDT 2010
Francois Pichet <pichet2000 at gmail.com> writes:
[snip]
> I am not a CMake expert (hello Oscar!), but if nobody fix it. I'll try
> to do it myself.
Disabling EH on MSVC creates warnings coming from system files
(xlocale). I'm reluctant to commit the patch until the consequences are
analyzed.
index a71c6f2..deca699 100644
--- a/cmake/modules/LLVMProcessSources.cmake
+++ b/cmake/modules/LLVMProcessSources.cmake
@@ -41,11 +41,15 @@ function(llvm_process_sources OUT_VAR)
if( NOT LLVM_REQUIRES_EH )
if( CMAKE_COMPILER_IS_GNUCXX )
add_definitions( -fno-exceptions )
+ elseif( MSVC )
+ add_definitions( /EHs-c- )
endif()
endif()
if( NOT LLVM_REQUIRES_RTTI )
if( CMAKE_COMPILER_IS_GNUCXX )
add_definitions( -fno-rtti )
+ elseif( MSVC )
+ add_definitions( /GR- )
endif()
endif()
More information about the llvm-dev
mailing list