libcxx: optional wide characters support.

Disable wchar can reduce approximately 1/3 of the libcxx.
mainly from locale, string and streams.

Platform: sim
Figures: bin size in bytes.

   Size   | Description
----------+------------------------------------------------
 10045336 | Base, enable libcxx whithout any cxx programs.
 42067224 | Add cxxtest.
 29997304 | Disable libcxx wchar support.

Signed-off-by: jihandong <jihandong@xiaomi.com>
This commit is contained in:
jihandong
2024-06-11 18:04:09 +08:00
committed by Xiang Xiao
parent 65aa5415a7
commit 100c43c8c3
3 changed files with 10 additions and 7 deletions
+5 -1
View File
@@ -9,6 +9,8 @@
#ifndef _LIBCPP___CONFIG_SITE
#define _LIBCPP___CONFIG_SITE
#include <nuttx/config.h>
#define _LIBCPP_ABI_VERSION 1
#define _LIBCPP_ABI_NAMESPACE __1
/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
@@ -26,7 +28,9 @@
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
#ifndef CONFIG_CXX_WCHAR
#define _LIBCPP_HAS_NO_WIDE_CHARACTERS
#endif
#define _LIBCPP_ENABLE_ASSERTIONS_DEFAULT 0
// PSTL backends