diff options
author | James Y Knight <jyknight@google.com> | 2017-01-13 19:22:26 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2017-01-13 19:22:26 +0000 |
commit | 0ecfd76f83e8388125b6dca6a99efb2823c7e940 (patch) | |
tree | 0a2732615720d077258d1cd2dbc73738e0cf7d30 /CMakeLists.txt | |
parent | 7974233f54ec26440b536fc345168611f7759412 (diff) |
[libc++abi] Add a silent terminate handler to libcxxabi.
The current std::terminate_handler pulls in some string code, some I/O
code, and more. Since it is automatically setup as the default, this
means that any trivial binary linking against libcxxabi will get this
extra bloat.
This patch allows disabling it as a build-time option, if you want to
avoid the extra bloat.
Patch by Tom Rybka!
Reviewers: EricWF
Subscribers: danalbert, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28497
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ee0d623..adee47f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,6 +433,10 @@ if (LIBCXXABI_USE_LLVM_UNWINDER) add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER=1) endif() +if (LIBCXXABI_SILENT_TERMINATE) + add_definitions(-DLIBCXXABI_SILENT_TERMINATE=1) +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}") |