[libcxxabi] r235964 - libc++abi: try harder to force the LLVM unwinder on ARM

Saleem Abdulrasool compnerd at compnerd.org
Mon Apr 27 19:09:54 PDT 2015


Author: compnerd
Date: Mon Apr 27 21:09:53 2015
New Revision: 235964

URL: http://llvm.org/viewvc/llvm-project?rev=235964&view=rev
Log:
libc++abi: try harder to force the LLVM unwinder on ARM

Attempting to default the option to ON for ARM doesnt seem to work.  Force the
check lower and perform the check at the two sites that matter: the CPPFLAGS
definition and the header search path setup.

Modified:
    libcxxabi/trunk/CMakeLists.txt

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=235964&r1=235963&r2=235964&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Mon Apr 27 21:09:53 2015
@@ -114,12 +114,7 @@ endif()
 option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
 option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
 option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
-set(LIBCXXABI_USE_LLVM_UNWINDER_DEFAULT OFF)
-if (${LLVM_NATIVE_ARCH} MATCHES arm)
-  set(LIBCXXABI_USE_LLVM_UNWINDER_DEFAULT ON)
-endif ()
-option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder."
-       ${LIBCXXABI_USE_LLVM_UNWINDER_DEFAULT})
+option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF)
 option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)
 set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE STRING "GCC toolchain for cross compiling.")
 set(LIBCXXABI_SYSROOT "" CACHE STRING "Sysroot for cross compiling.")
@@ -286,7 +281,7 @@ if (MSVC)
 endif()
 
 # Define LIBCXXABI_USE_LLVM_UNWINDER for conditional compilation.
-if (LIBCXXABI_USE_LLVM_UNWINDER)
+if (LIBCXXABI_USE_LLVM_UNWINDER OR ${LLVM_NATIVE_ARCH} MATCHES ARM)
   add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER=1)
 endif()
 
@@ -305,7 +300,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LI
 #===============================================================================
 
 include_directories(include)
-if (LIBCXXABI_USE_LLVM_UNWINDER)
+if (LIBCXXABI_USE_LLVM_UNWINDER OR ${LLVM_NATIVE_ARCH} MATCHES ARM)
   include_directories(${LLVM_MAIN_SRC_DIR}/projects/libunwind/include)
 endif ()
 





More information about the cfe-commits mailing list