[libcxxabi] r228408 - unwind: use -fno-rtti -fno-exceptions -funwind-tables
Sergey Dmitrouk
sdmitrouk at accesssoftek.com
Mon Feb 16 06:15:32 PST 2015
On Sat, Feb 14, 2015 at 12:12:08AM +0200, Sergey Dmitrouk wrote:
> On Fri, Feb 13, 2015 at 01:40:58PM -0800, Saleem Abdulrasool wrote:
> > How about doing that along with a check that if you are building a DSO
> > aborting the build with an error that it is unsupported?
Please see attached patch.
--
Sergey
-------------- next part --------------
src/Unwind/CMakeLists.txt | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/Unwind/CMakeLists.txt b/src/Unwind/CMakeLists.txt
index 56c217d..ed65083 100644
--- a/src/Unwind/CMakeLists.txt
+++ b/src/Unwind/CMakeLists.txt
@@ -69,9 +69,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")
More information about the cfe-commits
mailing list