From 1c5ae1314f7ce7a655b172c8c77a7768fff1b3f6 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Thu, 22 Jan 2015 13:39:08 +0000 Subject: Add -funwind-tables to CMAKE_C_FLAGS. Without -funwind-tables, the compiler won't generate the unwinding table for these C functions. However, the functions in libunwind, such as `_Unwind_Backtrace()`, WILL unwind stack to get the backtrace. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226823 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake') diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index ac31eed..b6ee40f 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -1,7 +1,9 @@ include(CheckLibraryExists) +include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) # Check compiler flags +check_c_compiler_flag(-funwind-tables LIBCXXABI_HAS_FUNWIND_TABLES) check_cxx_compiler_flag(-fPIC LIBCXXABI_HAS_FPIC_FLAG) check_cxx_compiler_flag(-fstrict-aliasing LIBCXXABI_HAS_FSTRICT_ALIASING_FLAG) check_cxx_compiler_flag(-nodefaultlibs LIBCXXABI_HAS_NODEFAULTLIBS_FLAG) -- cgit v1.2.3