mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
libcxx: supports CXX_MINI_LOCALIZATION
This commit contains changes: 1) define new C++ locale macros CXX_MINI_LOCALIZATION & CXX_NO_LOCALIZATION 2) define a new C++ macro _LIBCPP_HAS_MINI_LOCALIZATION for CXX_MINI_LOCALIZATION 3) update libxx/libcxx/CMakeLists.txt & Make.defs Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
ba63a4d234
commit
6ce6af9004
+12
-1
@@ -29,7 +29,6 @@ choice
|
||||
config LIBCXXTOOLCHAIN
|
||||
bool "Toolchain C++ support"
|
||||
select HAVE_CXXINITIALIZE
|
||||
select LIBC_LOCALE
|
||||
---help---
|
||||
Use Standard C++ library from toolchain.
|
||||
|
||||
@@ -120,10 +119,22 @@ config CXX_RTTI
|
||||
config CXX_WCHAR
|
||||
bool "Enable Wide Character Support"
|
||||
|
||||
choice
|
||||
prompt "C++ Locale and Stream select"
|
||||
default CXX_NO_LOCALIZATION
|
||||
|
||||
config CXX_NO_LOCALIZATION
|
||||
bool "No Locale and Stream Support"
|
||||
|
||||
config CXX_MINI_LOCALIZATION
|
||||
bool "Enable mini Locale and Stream Support"
|
||||
|
||||
config CXX_LOCALIZATION
|
||||
bool "Enable Locale and Stream Support"
|
||||
depends on LIBC_LOCALE
|
||||
|
||||
endchoice
|
||||
|
||||
if UCLIBCXX
|
||||
|
||||
config UCLIBCXX_BUFSIZE
|
||||
|
||||
@@ -27,8 +27,10 @@
|
||||
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
|
||||
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
|
||||
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
|
||||
#ifndef CONFIG_CXX_LOCALIZATION
|
||||
#if defined(CONFIG_CXX_NO_LOCALIZATION)
|
||||
# define _LIBCPP_HAS_NO_LOCALIZATION
|
||||
#elif defined(CONFIG_CXX_MINI_LOCALIZATION)
|
||||
# define _LIBCPP_HAS_MINI_LOCALIZATION
|
||||
#endif
|
||||
#ifndef CONFIG_CXX_WCHAR
|
||||
# define _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
|
||||
@@ -119,7 +119,7 @@ if(CONFIG_LIBCXX)
|
||||
list(REMOVE_ITEM SRCS ${SRCSTMP})
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_CXX_LOCALIZATION)
|
||||
if(CONFIG_CXX_NO_LOCALIZATION)
|
||||
file(
|
||||
GLOB
|
||||
SRCSTMP
|
||||
|
||||
@@ -89,7 +89,7 @@ ifeq ($(shell [ $(CPP_STD_VER) -le 14 ] && echo true),true)
|
||||
CPPSRCS := $(filter-out $(EXCLUDE_FILES), $(CPPSRCS))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CXX_LOCALIZATION),)
|
||||
ifeq ($(CONFIG_CXX_NO_LOCALIZATION),y)
|
||||
LOCALE_CPPSRCS := libcxx/libcxx/src/ios.cpp
|
||||
LOCALE_CPPSRCS += libcxx/libcxx/src/ios.instantiations.cpp
|
||||
LOCALE_CPPSRCS += libcxx/libcxx/src/iostream.cpp
|
||||
|
||||
Reference in New Issue
Block a user