[libcxxabi] r227238 - Merging r226823:

Hans Wennborg hans at hanshq.net
Tue Jan 27 12:40:23 PST 2015


Author: hans
Date: Tue Jan 27 14:40:22 2015
New Revision: 227238

URL: http://llvm.org/viewvc/llvm-project?rev=227238&view=rev
Log:
Merging r226823:
------------------------------------------------------------------------
r226823 | logan | 2015-01-22 05:39:08 -0800 (Thu, 22 Jan 2015) | 6 lines

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.

------------------------------------------------------------------------

Modified:
    libcxxabi/branches/release_36/   (props changed)
    libcxxabi/branches/release_36/CMakeLists.txt
    libcxxabi/branches/release_36/cmake/config-ix.cmake

Propchange: libcxxabi/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 27 14:40:22 2015
@@ -1 +1 @@
-/libcxxabi/trunk:226818-226820,226822
+/libcxxabi/trunk:226818-226820,226822-226823

Modified: libcxxabi/branches/release_36/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/branches/release_36/CMakeLists.txt?rev=227238&r1=227237&r2=227238&view=diff
==============================================================================
--- libcxxabi/branches/release_36/CMakeLists.txt (original)
+++ libcxxabi/branches/release_36/CMakeLists.txt Tue Jan 27 14:40:22 2015
@@ -162,6 +162,7 @@ macro(append_if list condition var)
   endif()
 endmacro()
 
+set(LIBCXXABI_C_FLAGS "")
 set(LIBCXXABI_CXX_FLAGS "")
 set(LIBCXXABI_COMPILE_FLAGS "")
 set(LIBCXXABI_LINK_FLAGS "")
@@ -214,6 +215,8 @@ endif()
 append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_FSTRICT_ALIASING_FLAG -fstrict-aliasing)
 append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_EHSC_FLAG -EHsc)
 
+append_if(LIBCXXABI_C_FLAGS LIBCXXABI_HAS_FUNWIND_TABLES -funwind-tables)
+
 # Assert
 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
 if (LIBCXXABI_ENABLE_ASSERTIONS)
@@ -252,6 +255,7 @@ endif()
 
 string(REPLACE ";" " " LIBCXXABI_CXX_FLAGS "${LIBCXXABI_CXX_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXXABI_CXX_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}")
 
 #===============================================================================
 # Setup Source Code

Modified: libcxxabi/branches/release_36/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/branches/release_36/cmake/config-ix.cmake?rev=227238&r1=227237&r2=227238&view=diff
==============================================================================
--- libcxxabi/branches/release_36/cmake/config-ix.cmake (original)
+++ libcxxabi/branches/release_36/cmake/config-ix.cmake Tue Jan 27 14:40:22 2015
@@ -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)





More information about the cfe-commits mailing list