summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2015-01-22 13:27:36 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2015-01-22 13:27:36 +0000
commit083506f224853c0e5c0d972ef60d25d42d769d6a (patch)
tree60d387f1be0bb5a51fe2d9dbdf4b5f0bd9471ec5 /CMakeLists.txt
parentad3ce5d4bbd9d9e4eff05eaf2d9b74799469c047 (diff)
Allow libc++abi to be built without unwinder.
This CL adds a new compilation flags LIBCXXABI_USE_LLVM_UNWINDER to specify whether the LLVM unwinder is enabled. Besides, all unwinder-specific code are guarded with this definition. Now, libc++abi will be able to use the unwinding routine from libgcc when LIBCXXABI_USE_LLVM_UNWINDER is disabled. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63301e7..aaada04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -247,6 +247,11 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
+# Define LIBCXXABI_USE_LLVM_UNWINDER for conditional compilation.
+if (LIBCXXABI_USE_LLVM_UNWINDER)
+ add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER=1)
+endif()
+
append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_TARGET_TRIPLE
"-target ${LIBCXXABI_TARGET_TRIPLE}")
append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_GCC_TOOLCHAIN