lib: cpp: Relocate C++ ABI library components to lib/cpp/abi

This commit relocates the "C++ ABI library" components such as
global constructor/destructor and initialiser handlers to a dedicated
directory, `lib/cpp/abi`, in order to provide a clear separation
between the C++ ABI/runtime library and the standard C++ library
components.

Note that the Zephyr C++ ABI library currently implements the GNU/GCC
C++ ABI, which is the de-facto standard ABI used by many compilers
including Clang -- it may be necessary to sub-divide the `lib/cpp/abi`
into `lib/cpp/abi/gnu` and `lib/cpp/abi/someotherabi` in the future
when adding the support for a C++ compiler that expects an ABI vastly
different from the GNU C++ ABI.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit is contained in:
Stephanos Ioannidis 2022-12-08 22:07:26 +09:00 committed by Christopher Friedt
parent 8c94410022
commit 03879b9e2b
6 changed files with 10 additions and 7 deletions

View file

@ -1,12 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(cpp_init.c)
zephyr_sources_ifdef(CONFIG_CPP_STATIC_INIT_GNU
cpp_init_array.c
cpp_ctors.c
cpp_dtors.c
)
add_subdirectory(abi)
if (NOT CONFIG_LIB_CPLUSPLUS)
zephyr_system_include_directories(

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(cpp_init.c)
zephyr_sources_ifdef(CONFIG_CPP_STATIC_INIT_GNU
cpp_init_array.c
cpp_ctors.c
cpp_dtors.c
)