xiaoxiang781216 commented on code in PR #18096:
URL: https://github.com/apache/nuttx/pull/18096#discussion_r2715896649
##########
libs/libxx/Kconfig:
##########
@@ -56,26 +60,21 @@ endchoice
config ETL
bool "Embedded Template Library (ETL)"
- depends on ALLOW_MIT_COMPONENTS
+ depends on LIBCXXMINI && ALLOW_MIT_COMPONENTS
---help---
ETL A C++ Template library for Embedded applications
Implements C++ templates such as containers, string
singleton math without C++ STL libraries
+if !LIBCXXMINI
+
choice
prompt "C++ low level library select"
- default LIBMINIABI if LIBCXXNONE
default LIBSUPCXX_TOOLCHAIN
-config LIBMINIABI
- bool "Basic C++ support"
- ---help---
- A fragmentary C++ library that will allow to build only
- the simplest of C++ applications. Only contain basic C++
- runtime support function.
-
config LIBCXXABI
bool "LLVM low level C++ Library"
+ select SCHED_THREAD_LOCAL
Review Comment:
depends on
##########
libs/libxx/__config_site:
##########
@@ -18,52 +18,57 @@
/* #undef _LIBCPP_HAS_NO_THREADS */
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
/* #undef _LIBCPP_HAS_MUSL_LIBC */
-#define _LIBCPP_HAS_THREAD_API_PTHREAD 1
+/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
-/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
+#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS 1
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
/* #undef _LIBCPP_NO_VCRUNTIME */
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
-#define _LIBCPP_HAS_NO_CONTENTION_TABLE
#if defined(CONFIG_CXX_NO_LOCALIZATION)
-# define _LIBCPP_HAS_NO_LOCALIZATION
+#define _LIBCPP_HAS_NO_LOCALIZATION
#elif defined(CONFIG_CXX_MINI_LOCALIZATION)
-# define _LIBCPP_HAS_MINI_LOCALIZATION
+#define _LIBCPP_HAS_MINI_LOCALIZATION
#endif
#ifndef CONFIG_CXX_WCHAR
Review Comment:
restore ALL indent
##########
libs/libxx/__config_site:
##########
@@ -18,52 +18,57 @@
/* #undef _LIBCPP_HAS_NO_THREADS */
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
/* #undef _LIBCPP_HAS_MUSL_LIBC */
-#define _LIBCPP_HAS_THREAD_API_PTHREAD 1
+/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
-/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
+#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS 1
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
/* #undef _LIBCPP_NO_VCRUNTIME */
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
-#define _LIBCPP_HAS_NO_CONTENTION_TABLE
#if defined(CONFIG_CXX_NO_LOCALIZATION)
-# define _LIBCPP_HAS_NO_LOCALIZATION
+#define _LIBCPP_HAS_NO_LOCALIZATION
#elif defined(CONFIG_CXX_MINI_LOCALIZATION)
-# define _LIBCPP_HAS_MINI_LOCALIZATION
+#define _LIBCPP_HAS_MINI_LOCALIZATION
#endif
#ifndef CONFIG_CXX_WCHAR
-# define _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#define _LIBCPP_HAS_NO_WIDE_CHARACTERS
#endif
#define _LIBCPP_ENABLE_ASSERTIONS_DEFAULT 0
// PSTL backends
+#define _LIBCPP_PSTL_BACKEND_SERIAL
#define _LIBCPP_PSTL_CPU_BACKEND_SERIAL
/* #undef _LIBCPP_PSTL_CPU_BACKEND_THREAD */
/* #undef _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH */
+// Force each translation unit to emit the necessary basic_string
+// specializations (avoids missing wide-character dtor symbols).
+#define _LIBCPP_DISABLE_EXTERN_TEMPLATE 1
+
+// Type traits tuning.
+#define _LIBCPP_DISABLE_DECAY_BUILTIN 1
+
// Hardening.
#define _LIBCPP_ENABLE_HARDENED_MODE_DEFAULT 0
#define _LIBCPP_ENABLE_DEBUG_MODE_DEFAULT 0
+#define _LIBCPP_HARDENING_MODE_DEFAULT _LIBCPP_HARDENING_MODE_FAST
+#define _LIBCPP_HARDENING_MODE _LIBCPP_HARDENING_MODE_DEFAULT
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS 1
#define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT 1
// __USE_MINGW_ANSI_STDIO gets redefined on MinGW
#ifdef __clang__
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wmacro-redefined"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#ifdef __clang__
-# pragma clang diagnostic pop
+#pragma clang diagnostic pop
Review Comment:
why change
##########
libs/libxx/__config_site:
##########
@@ -18,52 +18,57 @@
/* #undef _LIBCPP_HAS_NO_THREADS */
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
/* #undef _LIBCPP_HAS_MUSL_LIBC */
-#define _LIBCPP_HAS_THREAD_API_PTHREAD 1
+/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
-/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
+#define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS 1
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
/* #undef _LIBCPP_NO_VCRUNTIME */
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
-#define _LIBCPP_HAS_NO_CONTENTION_TABLE
#if defined(CONFIG_CXX_NO_LOCALIZATION)
-# define _LIBCPP_HAS_NO_LOCALIZATION
+#define _LIBCPP_HAS_NO_LOCALIZATION
#elif defined(CONFIG_CXX_MINI_LOCALIZATION)
-# define _LIBCPP_HAS_MINI_LOCALIZATION
+#define _LIBCPP_HAS_MINI_LOCALIZATION
#endif
#ifndef CONFIG_CXX_WCHAR
-# define _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#define _LIBCPP_HAS_NO_WIDE_CHARACTERS
#endif
#define _LIBCPP_ENABLE_ASSERTIONS_DEFAULT 0
// PSTL backends
+#define _LIBCPP_PSTL_BACKEND_SERIAL
#define _LIBCPP_PSTL_CPU_BACKEND_SERIAL
/* #undef _LIBCPP_PSTL_CPU_BACKEND_THREAD */
/* #undef _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH */
+// Force each translation unit to emit the necessary basic_string
+// specializations (avoids missing wide-character dtor symbols).
+#define _LIBCPP_DISABLE_EXTERN_TEMPLATE 1
+
+// Type traits tuning.
+#define _LIBCPP_DISABLE_DECAY_BUILTIN 1
+
// Hardening.
#define _LIBCPP_ENABLE_HARDENED_MODE_DEFAULT 0
#define _LIBCPP_ENABLE_DEBUG_MODE_DEFAULT 0
+#define _LIBCPP_HARDENING_MODE_DEFAULT _LIBCPP_HARDENING_MODE_FAST
+#define _LIBCPP_HARDENING_MODE _LIBCPP_HARDENING_MODE_DEFAULT
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS 1
#define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT 1
// __USE_MINGW_ANSI_STDIO gets redefined on MinGW
#ifdef __clang__
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wmacro-redefined"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmacro-redefined"
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]