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:
parent
6f9280941f
commit
626f96ec30
3 changed files with 27 additions and 5 deletions
|
@ -1,10 +1,15 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
zephyr_sources_ifdef(CONFIG_CPLUSPLUS
|
zephyr_sources(
|
||||||
cpp_virtual.c
|
|
||||||
cpp_vtable.cpp
|
|
||||||
cpp_init_array.c
|
cpp_init_array.c
|
||||||
cpp_ctors.c
|
cpp_ctors.c
|
||||||
cpp_dtors.c
|
cpp_dtors.c
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NOT CONFIG_LIB_CPLUSPLUS OR CONFIG_ZEPHYR_CPLUSPLUS)
|
||||||
|
zephyr_sources(
|
||||||
|
cpp_virtual.c
|
||||||
|
cpp_vtable.cpp
|
||||||
cpp_new.cpp
|
cpp_new.cpp
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
|
@ -65,4 +65,14 @@ config RTTI
|
||||||
help
|
help
|
||||||
This option enables support of C++ RTTI.
|
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
|
endif # CPLUSPLUS
|
||||||
|
|
|
@ -2,11 +2,18 @@ tests:
|
||||||
misc.app_dev.libcxx:
|
misc.app_dev.libcxx:
|
||||||
arch_exclude: posix
|
arch_exclude: posix
|
||||||
platform_exclude: qemu_x86_coverage
|
platform_exclude: qemu_x86_coverage
|
||||||
|
min_flash: 54
|
||||||
tags: cpp
|
tags: cpp
|
||||||
|
misc.app_dev.libcxx.zephyr_cpp:
|
||||||
|
arch_exclude: posix
|
||||||
|
platform_exclude: qemu_x86_coverage
|
||||||
|
tags: cpp
|
||||||
|
extra_configs:
|
||||||
|
- CONFIG_ZEPHYR_CPLUSPLUS=y
|
||||||
misc.app_dev.libcxx.exceptions:
|
misc.app_dev.libcxx.exceptions:
|
||||||
arch_exclude: posix
|
arch_exclude: posix
|
||||||
platform_exclude: qemu_x86_coverage 96b_meerkat96
|
platform_exclude: qemu_x86_coverage
|
||||||
colibri_imx7d_m4 warp7_m4 pico_pi_m4 qemu_x86_64
|
min_flash: 54
|
||||||
tags: cpp
|
tags: cpp
|
||||||
extra_configs:
|
extra_configs:
|
||||||
- CONFIG_EXCEPTIONS=y
|
- CONFIG_EXCEPTIONS=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue