8a98a67bf1
Use malloc/free instead of k_malloc/k_free in operator new/delete implementation or use libstdc++ implementation when available. Further updated cpp_synchronization sample to enable minimal libc heap as virtual destructor requires operator delete which depends on free. Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
18 lines
307 B
CMake
18 lines
307 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_sources(
|
|
cpp_init_array.c
|
|
cpp_ctors.c
|
|
cpp_dtors.c
|
|
)
|
|
|
|
if (NOT CONFIG_LIB_CPLUSPLUS AND
|
|
(NOT CONFIG_MINIMAL_LIBC OR
|
|
(CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE GREATER 0)))
|
|
zephyr_sources(
|
|
cpp_virtual.c
|
|
cpp_vtable.cpp
|
|
cpp_new.cpp
|
|
)
|
|
endif()
|