cxx: Add KConfig option for C++ exceptions, disable by default

Fixes https://github.com/espressif/esp-idf/issues/1072

(Additional 20KB is still used if C++ exception support is enabled in
menuconfig.)
This commit is contained in:
Angus Gratton
2017-10-04 17:29:21 +11:00
committed by Angus Gratton
parent 6f07e0797d
commit 9c7477ef34
6 changed files with 122 additions and 1 deletions
+13 -1
View File
@@ -93,7 +93,19 @@ config OPTIMIZATION_ASSERTIONS_DISABLED
endchoice # assertions
endmenu # Optimization level
config CXX_EXCEPTIONS
bool "Enable C++ exceptions"
default n
help
Enabling this option compiles all IDF C++ files with exception support enabled.
Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which throws
an exception will abort instead.
Enabling this option currently adds an additional 20KB of heap overhead, and 4KB of additional heap is allocated
the first time an exception is thrown in user code.
endmenu # Compiler Options
menu "Component config"
source "$COMPONENT_KCONFIGS"