treewide: Update deprecated CONFIG_LIB_CPLUSPLUS usages
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to: * check if the Zephyr minimal C++ library is enabled using `CONFIG_MINIMAL_LIBCPP` instead of relying on the `CONFIG_LIB_CPLUSPLUS`-based inference. * select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component- level C++ standard library dependency. This allows a component to declare C++ standard library dependency without designating a specific libray implementation. * select the correct type of C++ standard library implementation to use through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices. Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit is contained in:
parent
669a0f5bec
commit
cf211aa7af
12 changed files with 10 additions and 16 deletions
|
@ -339,7 +339,7 @@ if(NOT CONFIG_NATIVE_APPLICATION)
|
|||
toolchain_ld_baremetal()
|
||||
endif()
|
||||
|
||||
if(CONFIG_LIB_CPLUSPLUS)
|
||||
if(NOT CONFIG_MINIMAL_LIBCPP)
|
||||
# @Intent: Set linker specific flags for C++
|
||||
toolchain_ld_cpp()
|
||||
endif()
|
||||
|
@ -1881,7 +1881,7 @@ endif()
|
|||
zephyr_compile_options($<TARGET_PROPERTY:compiler,nostdinc>)
|
||||
target_include_directories(zephyr_interface SYSTEM INTERFACE $<TARGET_PROPERTY:compiler,nostdinc_include>)
|
||||
|
||||
if(NOT CONFIG_LIB_CPLUSPLUS)
|
||||
if(CONFIG_MINIMAL_LIBCPP)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler-cpp,nostdincxx>>)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ config ZEPHYR_TFLITE-MICRO_MODULE
|
|||
|
||||
config TENSORFLOW_LITE_MICRO
|
||||
bool "TensorFlow Lite Micro Support"
|
||||
select REQUIRES_FULL_LIBCPP
|
||||
help
|
||||
This option enables the TensorFlow Lite Micro library.
|
||||
|
||||
|
|
|
@ -5,5 +5,4 @@ CONFIG_CHRE_LOG_LEVEL_DBG=y
|
|||
|
||||
CONFIG_CPP=y
|
||||
CONFIG_STD_CPP17=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_CPP_MAIN=y
|
||||
|
|
|
@ -13,7 +13,5 @@
|
|||
# limitations under the License.
|
||||
# ==============================================================================s
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
CONFIG_TENSORFLOW_LITE_MICRO=y
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
# limitations under the License.
|
||||
# ==============================================================================
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
|
||||
CONFIG_SENSOR=y
|
||||
CONFIG_NETWORKING=n
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#application default configuration
|
||||
# include TFLM based on CMSIS NN optimization and ETHOSU acceleration
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
CONFIG_TENSORFLOW_LITE_MICRO=y
|
||||
CONFIG_ARM_ETHOS_U=y
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=16384
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_STD_CPP17=y
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_STACK_SIZE=5120
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests:
|
||||
cpp.libcxx.newlib:
|
||||
cpp.libcxx.glibcxx.newlib:
|
||||
filter: TOOLCHAIN_HAS_NEWLIB == 1
|
||||
toolchain_exclude: xcc
|
||||
min_flash: 54
|
||||
|
@ -7,10 +7,11 @@ tests:
|
|||
tags: cpp
|
||||
extra_configs:
|
||||
- CONFIG_NEWLIB_LIBC=y
|
||||
- CONFIG_GLIBCXX_LIBCPP=y
|
||||
- CONFIG_CPP_EXCEPTIONS=y
|
||||
integration_platforms:
|
||||
- mps2_an385
|
||||
cpp.libcxx.newlib_nano:
|
||||
cpp.libcxx.glibcxx.newlib_nano:
|
||||
filter: TOOLCHAIN_HAS_NEWLIB == 1
|
||||
toolchain_exclude: xcc
|
||||
min_flash: 54
|
||||
|
@ -19,6 +20,7 @@ tests:
|
|||
extra_configs:
|
||||
- CONFIG_NEWLIB_LIBC=y
|
||||
- CONFIG_NEWLIB_LIBC_NANO=y
|
||||
- CONFIG_GLIBCXX_LIBCPP=y
|
||||
integration_platforms:
|
||||
- mps2_an385
|
||||
cpp.libcxx.arcmwdtlib:
|
||||
|
@ -27,3 +29,4 @@ tests:
|
|||
tags: cpp
|
||||
extra_configs:
|
||||
- CONFIG_ARCMWDT_LIBC=y
|
||||
- CONFIG_ARCMWDT_LIBCPP=y
|
||||
|
|
|
@ -2,4 +2,3 @@ CONFIG_ZTEST=y
|
|||
CONFIG_ZTEST_NEW_API=y
|
||||
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
|
|
|
@ -5,4 +5,3 @@ CONFIG_ZTEST=y
|
|||
CONFIG_ZTEST_NEW_API=y
|
||||
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
|
|
|
@ -5,4 +5,4 @@ CONFIG_ZTEST=y
|
|||
CONFIG_ZTEST_NEW_API=y
|
||||
|
||||
CONFIG_CPP=y
|
||||
CONFIG_LIB_CPLUSPLUS=y
|
||||
CONFIG_EXTERNAL_LIBCPP=y
|
||||
|
|
2
west.yml
2
west.yml
|
@ -29,7 +29,7 @@ manifest:
|
|||
revision: dec12fa3f0d790cafa8414a4c2930ea71ab72ffd
|
||||
path: modules/lib/canopennode
|
||||
- name: chre
|
||||
revision: fe0ab36e0fa7453a4c9b97bedac89709f45cf965
|
||||
revision: b7955c27e50485b7dafdc3888d7d6afdc2ac6d96
|
||||
path: modules/lib/chre
|
||||
- name: cmsis
|
||||
revision: 74981bf893e8b10931464b9945e2143d99a3f0a3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue