1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[CMake] Fix LLVM_ENABLE_EH and LLVM_ENABLE_RTTI on MSVC

Patch by Johannes Sebastian Mueller-Roemer.

Differential Revision: https://reviews.llvm.org/D23645

llvm-svn: 280371
This commit is contained in:
Andrey Bokhanko 2016-09-01 14:39:54 +00:00
parent e65f7b0df0
commit 930b1b4784

View File

@ -15,6 +15,9 @@ function(llvm_update_compile_flags name)
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 @@ function(llvm_update_compile_flags name)
elseif (MSVC)
list(APPEND LLVM_COMPILE_FLAGS "/GR-")
endif ()
elseif(MSVC)
list(APPEND LLVM_COMPILE_FLAGS "/GR")
endif()
# Assume that;