diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2015-01-22 13:39:08 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2015-01-22 13:39:08 +0000 |
commit | 1c5ae1314f7ce7a655b172c8c77a7768fff1b3f6 (patch) | |
tree | 5f8d722d48d7715d182064dd3aa653f02b593ea0 /cmake | |
parent | 045a7c882bee744550c09c84109be93dc6142c11 (diff) |
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
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/config-ix.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
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) |