Index: llvm/trunk/cmake/modules/AddLLVM.cmake =================================================================== --- llvm/trunk/cmake/modules/AddLLVM.cmake +++ llvm/trunk/cmake/modules/AddLLVM.cmake @@ -15,6 +15,9 @@ message(AUTHOR_WARNING "Exception handling requires RTTI. Enabling RTTI for ${name}") set(LLVM_REQUIRES_RTTI ON) endif() + if(MSVC) + list(APPEND LLVM_COMPILE_FLAGS "/EHsc") + endif() else() if(LLVM_COMPILER_IS_GCC_COMPATIBLE) list(APPEND LLVM_COMPILE_FLAGS "-fno-exceptions") @@ -35,6 +38,8 @@ elseif (MSVC) list(APPEND LLVM_COMPILE_FLAGS "/GR-") endif () + elseif(MSVC) + list(APPEND LLVM_COMPILE_FLAGS "/GR") endif() # Assume that;