summaryrefslogtreecommitdiff
path: root/libcxxabi/cmake
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2015-01-22 13:39:08 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2015-01-22 13:39:08 +0000
commitde9cc02a31b459db4f2880eba11237fe9ed17bd5 (patch)
tree8ccee4450f91d17d09f6adc16ea924ea10771280 /libcxxabi/cmake
parent89bb97b7ff976cd33fc349a86fd0c4de3b768c7f (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.
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r--libcxxabi/cmake/config-ix.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index ac31eed6d7a..b6ee40f8d66 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/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)