diff options
Diffstat (limited to 'libcxxabi/src')
-rw-r--r-- | libcxxabi/src/Unwind/CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libcxxabi/src/Unwind/CMakeLists.txt b/libcxxabi/src/Unwind/CMakeLists.txt index 77bb0191f65..2aa45dce2a4 100644 --- a/libcxxabi/src/Unwind/CMakeLists.txt +++ b/libcxxabi/src/Unwind/CMakeLists.txt @@ -70,9 +70,16 @@ append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_HAS_FPIC_FLAG -fPIC) append_if(LIBCXXABI_LINK_FLAGS LIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs) set(LIBUNWIND_COMPILE_FLAGS) -append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_NO_EXCEPTIONS_FLAG -fno-exceptions) append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_NO_RTTI_FLAG -fno-rtti) -append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_FUNWIND_TABLES -funwind-tables) +if ( LIBCXXABI_HAS_NO_EXCEPTIONS_FLAG AND LIBCXXABI_HAS_FUNWIND_TABLES ) + list(APPEND LIBUNWIND_COMPILE_FLAGS -fno-exceptions) + list(APPEND LIBUNWIND_COMPILE_FLAGS -funwind-tables) +elseif( LIBUNWIND_ENABLE_SHARED ) + message(FATAL_ERROR "Compiler doesn't support generation of unwind tables " + "if exception support is disabled. Building libunwind " + "DSO with runtime dependency on libcxxabi is not " + "supported.") +endif() set(LIBCXXABI_UNWINDER_NAME "unwind") |