File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ include(CMakeDependentOption)
4646include (HandleCompilerRT)
4747
4848# Define options.
49+ option (LIBCXXABI_ENABLE_DEMANGLER
50+ "Provide support for demangling in the runtime.
51+ When disabled, libc++abi does not support the name demangler API." ON )
4952option (LIBCXXABI_ENABLE_EXCEPTIONS
5053 "Provide support for exceptions in the runtime.
5154 When disabled, libc++abi does not support stack unwinding and other exceptions-related features." ON )
@@ -129,8 +132,6 @@ option(LIBCXXABI_BAREMETAL "Build libc++abi for baremetal targets." OFF)
129132# The default terminate handler attempts to demangle uncaught exceptions, which
130133# causes extra I/O and demangling code to be pulled in.
131134option (LIBCXXABI_SILENT_TERMINATE "Set this to make the terminate handler default to a silent alternative" OFF )
132- option (LIBCXXABI_NON_DEMANGLING_TERMINATE "Set this to make the terminate handler
133- avoid demangling" OFF )
134135
135136if (NOT LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_STATIC)
136137 message (FATAL_ERROR "libc++abi must be built as either a shared or static library." )
@@ -431,7 +432,7 @@ if (LIBCXXABI_SILENT_TERMINATE)
431432 add_definitions (-DLIBCXXABI_SILENT_TERMINATE)
432433endif ()
433434
434- if (LIBCXXABI_NON_DEMANGLING_TERMINATE )
435+ if (NOT LIBCXXABI_ENABLE_DEMANGLER )
435436 add_definitions (-DLIBCXXABI_NON_DEMANGLING_TERMINATE)
436437endif ()
437438
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ set(LIBCXXABI_SOURCES
33 # C++ABI files
44 cxa_aux_runtime.cpp
55 cxa_default_handlers.cpp
6- cxa_demangle.cpp
76 cxa_exception_storage.cpp
87 cxa_guard.cpp
98 cxa_handlers.cpp
@@ -19,6 +18,12 @@ set(LIBCXXABI_SOURCES
1918 private_typeinfo.cpp
2019)
2120
21+ if (LIBCXXABI_ENABLE_DEMANGLER)
22+ list (APPEND LIBCXXABI_SOURCES
23+ cxa_demangle.cpp
24+ )
25+ endif ()
26+
2227if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
2328 list (APPEND LIBCXXABI_SOURCES
2429 stdlib_new_delete.cpp
You can’t perform that action at this time.
0 commit comments