Patch by Johannes Sebastian Mueller-Roemer.
Differential Revision: https://reviews.llvm.org/D23645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280371
91177308-0d34-0410-b5e6-
96231b3b80d8
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")
elseif (MSVC)
list(APPEND LLVM_COMPILE_FLAGS "/GR-")
endif ()
+ elseif(MSVC)
+ list(APPEND LLVM_COMPILE_FLAGS "/GR")
endif()
# Assume that;