mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
[CMake] llvm_update_compile_flags: Honor LLVM_COMPILE_FLAGS.
I accidentally mis-dropped LLVM_COMPILE_FLAGS in r200301. Sorry for that. llvm-svn: 200499
This commit is contained in:
parent
10805da43c
commit
17cbd6841a
@ -12,22 +12,27 @@ function(llvm_update_compile_flags name)
|
||||
set(LLVM_REQUIRES_RTTI ON)
|
||||
else()
|
||||
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
||||
set(target_compile_flags "${target_compile_flags} -fno-exceptions")
|
||||
list(APPEND LLVM_COMPILE_FLAGS "-fno-exceptions")
|
||||
elseif(MSVC)
|
||||
list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
|
||||
set(target_compile_flags "${target_compile_flags} /EHs-c-")
|
||||
list(APPEND LLVM_COMPILE_FLAGS "/EHs-c-")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT LLVM_REQUIRES_RTTI)
|
||||
list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
|
||||
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
||||
set(target_compile_flags "${target_compile_flags} -fno-rtti")
|
||||
list(APPEND LLVM_COMPILE_FLAGS "-fno-rtti")
|
||||
elseif (MSVC)
|
||||
set(target_compile_flags "${target_compile_flags} /GR-")
|
||||
list(APPEND LLVM_COMPILE_FLAGS "/GR-")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
# Assume that;
|
||||
# - LLVM_COMPILE_FLAGS is list.
|
||||
# - PROPERTY COMPILE_FLAGS is string.
|
||||
string(REPLACE ";" " " target_compile_flags "${LLVM_COMPILE_FLAGS}")
|
||||
|
||||
if(update_src_props)
|
||||
foreach(fn ${sources})
|
||||
get_filename_component(suf ${fn} EXT)
|
||||
@ -399,7 +404,7 @@ function(add_unittest test_suite test_name)
|
||||
endif ()
|
||||
|
||||
if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
|
||||
set(LLVM_COMPILE_FLAGS "-Wno-variadic-macros")
|
||||
list(APPEND LLVM_COMPILE_FLAGS "-Wno-variadic-macros")
|
||||
endif ()
|
||||
|
||||
set(LLVM_REQUIRES_RTTI OFF)
|
||||
|
Loading…
Reference in New Issue
Block a user