Commit Graph

4 Commits

Author SHA1 Message Date
Stephanos Ioannidis 669a0f5bec lib: cpp: Rework C++ standard library configurations
This commit reworks the C++ standard library configurations such that:

* the separation between the Zephyr minimal C++ library and the fully
  featured C++ standard libraries, such as GNU libstdc++, is clear.
  This is done by deprecating the Kconfig `CONFIG_LIB_CPLUSPLUS`
  symbol, which implies that the minimal C++ library is selected when
  set to `n`, and introducing the `CONFIG_MINIMAL_LIBCPP` symbol.

* the type of the selected C++ standard library is clear. This is done
  by introducing a Kconfig choice, `LIBCPP_IMPLEMENTATION`, for the C++
  standard library type and providing the choice symbols for each
  library type supported, such as `CONFIG_MINIMAL_LIBCPP` and
  `CONFIG_GLIBCXX_LIBCPP`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis 45ba8d5787 lib: cpp: Rename CONFIG_RTTI to CONFIG_CPP_RTTI
The Kconfig `CONFIG_RTTI` symbol enables the C++ Run-Time Type
Information (RTTI) support and is a feature of the standard C++
library; therefore, it should be prefixed with `CPP_` as with the rest
of the C++-specific symbols.

This commit renames the Kconfig `CONFIG_RTTI` symbol to
`CONFIG_CPP_RTTI` in order to better align with the other existing C++
Kconfig symbols, and deprecates the old `CONFIG_RTTI` symbol.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis 26ede92f84 lib: cpp: Rename CONFIG_EXCEPTIONS to CONFIG_CPP_EXCEPTIONS
`CONFIG_EXCEPTIONS` is ambiguous in that the word "exception" may be
used to refer to many different types of exceptions, from the hardware
generated faults and interrupts (aka. exceptions) to the C++
exceptions.

This commit renames the Kconfig `CONFIG_EXCEPTIONS` symbol to
`CONFIG_CPP_EXCEPTIONS` in order to clarify that the symbol refers to
the C++ exceptions and eliminate any ambiguity, and deprecates the old
`CONFIG_EXCEPTIONS` symbol.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis 05aea1ce58 lib: cpp: Rename CONFIG_CPLUSPLUS to CONFIG_CPP
There is no reason for the top-level C++ Kconfig symbol to be called
`CPLUSPLUS` when the convention used throughout the Zephyr codebase is
to use "cpp" to refer to C++ and the rest of the C++-related Kconfig
symbols are prefixed with `CPP_`.

This commit renames the Kconfig `CPLUSPLUS` symbol to `CPP` in order to
better align with the de-facto standard naming convention used throughout
the Zephyr codebase, and deprecates the old `CPLUSPLUS` symbol.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00