diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2016-11-13 14:42:15 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2016-11-13 14:42:15 +0000 |
commit | 6962eb354b46062b997a740efa1c63724a8d3caf (patch) | |
tree | aaedf3ecb81440fae9c06aea525480aa955b1cac | |
parent | 4d14bc02317d474bd262e09d351a5d8db21f1622 (diff) |
[CMake] Fix libc++abi arm build w/o libunwind.
This commit fixes libc++abi build when LLVM unwinder (libunwind_llvm) is
not enabled.
This commit fixes the problem by removing "LLVM_NATIVE_ARCH MATCHES ARM"
from CMakeLists.txt so that LIBCXXABI_USE_LLVM_UNWINDER will only be
defined when LLVM unwinder is enabled.
We need LIBCXXABI_USE_LLVM_UNWINDER becase there is a subtle difference
between the unwinder from libgcc and the one from libunwind_llvm. For
the unwinder from libgcc, we have to initialize register r12 with the
address of _Unwind_Control_Block; otherwise,
_Unwind_GetLanguageSpecificData() and _Unwind_GetRegionStart() won't
work properly. Consequently, there is an extra _Unwind_SetGR() when
LLVM unwinder is disabled. Check cxa_personality.cpp for details.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286759 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 77f4202..b23936e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -362,7 +362,7 @@ if (MSVC) endif() # Define LIBCXXABI_USE_LLVM_UNWINDER for conditional compilation. -if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM) +if (LIBCXXABI_USE_LLVM_UNWINDER) add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER=1) endif() |