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

View File

@@ -188,8 +188,12 @@ TEST_CASE("before scheduler has started, static initializers work correctly", "[
TEST_ASSERT_EQUAL(2, StaticInitTestBeforeScheduler::order);
}
#ifdef CONFIG_CXX_EXCEPTIONS
TEST_CASE("c++ exceptions work", "[cxx]")
{
/* Note: This test currently trips the memory leak threshold
as libunwind allocates ~4KB of data on first exception. */
int thrown_value;
try
{
@@ -203,6 +207,8 @@ TEST_CASE("c++ exceptions work", "[cxx]")
printf("OK?\n");
}
#endif
/* These test cases pull a lot of code from libstdc++ and are disabled for now
*/
#if 0