cpp: Added option to disable Zephyrs cpp implementation

Added a Kconfig option to disable Zephyrs cpp implementation for
operator new, delete, pure virtual functions and vtables.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
This commit is contained in:
Jan Van Winkel 2019-08-18 02:13:32 +02:00 committed by Andrew Boie
commit 626f96ec30
3 changed files with 27 additions and 5 deletions

View file

@ -1,10 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources_ifdef(CONFIG_CPLUSPLUS
cpp_virtual.c
cpp_vtable.cpp
zephyr_sources(
cpp_init_array.c
cpp_ctors.c
cpp_dtors.c
)
if (NOT CONFIG_LIB_CPLUSPLUS OR CONFIG_ZEPHYR_CPLUSPLUS)
zephyr_sources(
cpp_virtual.c
cpp_vtable.cpp
cpp_new.cpp
)
endif()

View file

@ -65,4 +65,14 @@ config RTTI
help
This option enables support of C++ RTTI.
if LIB_CPLUSPLUS
config ZEPHYR_CPLUSPLUS
bool "Use Zephyr C++ Implementation"
help
Use Zephyr implementation for operator new, delete, pure virtual
functions and vtables.
endif #LIB_CPLUSPLUS
endif # CPLUSPLUS