summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/Unwind/CMakeLists.txt
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-02-06 17:47:57 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-02-06 17:47:57 +0000
commit123f44a2f6c3b19cf2d0f6a233fedb6da65edebd (patch)
treea4a84037c0f7cced374c6d0fd5151587021559b1 /libcxxabi/src/Unwind/CMakeLists.txt
parent79fdb75a34add89f82478b7bec5eaec8c1f7a0db (diff)
downloadbcm5719-llvm-123f44a2f6c3b19cf2d0f6a233fedb6da65edebd.tar.gz
bcm5719-llvm-123f44a2f6c3b19cf2d0f6a233fedb6da65edebd.zip
unwind: use -fno-rtti -fno-exceptions -funwind-tables
RTTI and exceptions are not needed for the unwinder, the use of C++ there is for very specific cases, and does not require dynamic_cast nor does it use exceptions. This avoids unnecessary references to type information being emitted. llvm-svn: 228408
Diffstat (limited to 'libcxxabi/src/Unwind/CMakeLists.txt')
-rw-r--r--libcxxabi/src/Unwind/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcxxabi/src/Unwind/CMakeLists.txt b/libcxxabi/src/Unwind/CMakeLists.txt
index 598a081ea3d..56c217d1788 100644
--- a/libcxxabi/src/Unwind/CMakeLists.txt
+++ b/libcxxabi/src/Unwind/CMakeLists.txt
@@ -68,6 +68,11 @@ target_link_libraries(unwind ${libraries})
append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_HAS_FPIC_FLAG -fPIC)
append_if(LIBCXXABI_LINK_FLAGS LIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
+set(LIBUNWIND_COMPILE_FLAGS)
+append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_NO_EXCEPTIONS_FLAG -fno-exceptions)
+append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_NO_RTTI_FLAG -fno-rtti)
+append_if(LIBUNWIND_COMPILE_FLAGS LIBCXXABI_HAS_FUNWIND_TABLES -funwind-tables)
+
set(LIBCXXABI_UNWINDER_NAME "unwind")
if ( APPLE )
@@ -86,11 +91,12 @@ if ( APPLE )
endif()
string(REPLACE ";" " " LIBCXXABI_COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}")
+string(REPLACE ";" " " LIBUNWIND_COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}")
string(REPLACE ";" " " LIBCXXABI_LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}")
set_target_properties(unwind
PROPERTIES
- COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
+ COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS} ${LIBUNWIND_COMPILE_FLAGS}"
LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}"
OUTPUT_NAME "${LIBCXXABI_UNWINDER_NAME}"
VERSION "1.0"
OpenPOWER on IntegriCloud