2019-11-01 13:45:29 +01:00
|
|
|
# C++ configuration options
|
2018-10-23 18:20:51 +02:00
|
|
|
|
|
|
|
# Copyright (c) 2018 B. Leforestier
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2022-12-08 22:02:24 +01:00
|
|
|
menu "C++ Language Support"
|
|
|
|
|
|
|
|
config CPP
|
2019-05-15 23:01:58 +02:00
|
|
|
bool "C++ support for the application"
|
2018-10-23 18:20:51 +02:00
|
|
|
help
|
|
|
|
This option enables the use of applications built with C++.
|
|
|
|
|
2022-12-08 22:02:24 +01:00
|
|
|
if CPP
|
2019-05-15 23:01:58 +02:00
|
|
|
|
2018-10-23 18:20:51 +02:00
|
|
|
choice
|
|
|
|
prompt "C++ Standard"
|
|
|
|
default STD_CPP11
|
|
|
|
help
|
|
|
|
C++ Standards.
|
|
|
|
|
|
|
|
config STD_CPP98
|
|
|
|
bool "C++ 98"
|
|
|
|
help
|
|
|
|
1998 C++ standard as modified by the 2003 technical corrigendum
|
|
|
|
and some later defect reports.
|
|
|
|
|
|
|
|
config STD_CPP11
|
|
|
|
bool "C++ 11"
|
|
|
|
help
|
|
|
|
2011 C++ standard, previously known as C++0x.
|
|
|
|
|
|
|
|
config STD_CPP14
|
|
|
|
bool "C++ 14"
|
|
|
|
help
|
|
|
|
2014 C++ standard.
|
|
|
|
|
|
|
|
config STD_CPP17
|
|
|
|
bool "C++ 17"
|
|
|
|
help
|
|
|
|
2017 C++ standard, previously known as C++0x.
|
|
|
|
|
2021-07-14 10:50:21 +02:00
|
|
|
config STD_CPP2A
|
|
|
|
bool "C++ 2a"
|
|
|
|
help
|
|
|
|
Next revision of the C++ standard, which is expected to be published in 2020.
|
|
|
|
|
2021-07-09 19:46:46 +02:00
|
|
|
config STD_CPP20
|
|
|
|
bool "C++ 20"
|
2018-10-23 18:20:51 +02:00
|
|
|
help
|
2021-07-09 19:46:46 +02:00
|
|
|
2020 C++ standard, previously known as C++2A.
|
2018-10-23 18:20:51 +02:00
|
|
|
|
2021-07-09 19:54:11 +02:00
|
|
|
config STD_CPP2B
|
|
|
|
bool "C++ 2b"
|
|
|
|
help
|
|
|
|
Next revision of the C++ standard, which is expected to be published in 2023.
|
|
|
|
|
2018-10-23 18:20:51 +02:00
|
|
|
endchoice
|
|
|
|
|
2022-12-09 18:15:34 +01:00
|
|
|
config REQUIRES_FULL_LIBCPP
|
2023-04-25 03:47:16 +02:00
|
|
|
bool "Require complete C++ standard library"
|
2022-12-09 18:15:34 +01:00
|
|
|
select REQUIRES_FULL_LIBC
|
|
|
|
help
|
2023-04-25 03:47:16 +02:00
|
|
|
Indicates that a full C++ standard library is required, either by
|
|
|
|
a subsystem or an application. This will also include a full C
|
|
|
|
library implementation.
|
2022-12-09 18:15:34 +01:00
|
|
|
|
2023-05-01 17:59:35 +02:00
|
|
|
config FULL_LIBCPP_SUPPORTED
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
Selected when the target has at least one C++ library that offers a
|
|
|
|
complete implementation and which would be selected when
|
|
|
|
REQUIRES_FULL_LIBCPP is set.
|
|
|
|
|
2022-12-09 18:15:34 +01:00
|
|
|
choice LIBCPP_IMPLEMENTATION
|
|
|
|
prompt "C++ Standard Library Implementation"
|
|
|
|
default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_APPLICATION
|
|
|
|
default GLIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP
|
|
|
|
default MINIMAL_LIBCPP
|
|
|
|
|
|
|
|
config MINIMAL_LIBCPP
|
|
|
|
bool "Minimal C++ Library"
|
|
|
|
depends on !REQUIRES_FULL_LIBCPP
|
|
|
|
help
|
|
|
|
Build with the minimal C++ library provided by Zephyr.
|
|
|
|
|
|
|
|
The Zephyr minimal C++ library only provides a very limited subset
|
|
|
|
of the standard C++ library and is mainly intended for use with the
|
|
|
|
applications that do not require the Standard Template Library (STL).
|
|
|
|
|
|
|
|
config GLIBCXX_LIBCPP
|
|
|
|
bool "GNU C++ Standard Library"
|
|
|
|
depends on !NATIVE_APPLICATION
|
2022-11-02 21:11:41 +01:00
|
|
|
depends on NEWLIB_LIBC || PICOLIBC
|
2023-05-01 17:59:35 +02:00
|
|
|
select FULL_LIBCPP_SUPPORTED
|
2022-12-09 18:15:34 +01:00
|
|
|
help
|
|
|
|
Build with GNU C++ Standard Library (libstdc++) provided by the GNU
|
|
|
|
Compiler Collection (GCC)-based toolchain.
|
|
|
|
|
|
|
|
config ARCMWDT_LIBCPP
|
|
|
|
bool "ARC MWDT C++ Library"
|
|
|
|
depends on !NATIVE_APPLICATION
|
|
|
|
depends on ARCMWDT_LIBC
|
|
|
|
help
|
|
|
|
Build with ARC MetaWare C++ Standard Library provided by the ARC
|
|
|
|
MetaWare Development Tools (MWDT) toolchain.
|
|
|
|
|
|
|
|
config EXTERNAL_LIBCPP
|
|
|
|
bool "External C++ standard library"
|
|
|
|
help
|
|
|
|
Build with an external/user-provided C++ standard library.
|
|
|
|
|
|
|
|
endchoice # LIBCPP_IMPLEMENTATION
|
|
|
|
|
2022-11-04 16:22:25 +01:00
|
|
|
config CPP_MAIN
|
|
|
|
bool "C++ main() function definition"
|
|
|
|
help
|
|
|
|
This option instructs the Zephyr kernel to call the 'int main(void)'
|
|
|
|
instead of the 'void main(void)', which is the default main() type
|
|
|
|
for Zephyr.
|
|
|
|
|
|
|
|
C++ does not allow the main() to be defined with 'void' return type,
|
|
|
|
and any applications defining its main() in a C++ source file must
|
|
|
|
enable this option.
|
|
|
|
|
2022-12-09 18:15:34 +01:00
|
|
|
if !MINIMAL_LIBCPP
|
2019-08-13 15:17:01 +02:00
|
|
|
|
2022-12-09 11:35:59 +01:00
|
|
|
config CPP_EXCEPTIONS
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "C++ exceptions support"
|
2021-06-07 09:21:42 +02:00
|
|
|
depends on !NEWLIB_LIBC_NANO
|
2018-10-23 18:20:51 +02:00
|
|
|
help
|
|
|
|
This option enables support of C++ exceptions.
|
|
|
|
|
2022-12-09 11:59:47 +01:00
|
|
|
config CPP_RTTI
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "C++ RTTI support"
|
2018-10-23 18:20:51 +02:00
|
|
|
help
|
|
|
|
This option enables support of C++ RTTI.
|
|
|
|
|
2022-12-09 18:15:34 +01:00
|
|
|
endif # !MINIMAL_LIBCPP
|
2019-08-18 02:13:32 +02:00
|
|
|
|
2021-04-26 15:15:49 +02:00
|
|
|
config CPP_STATIC_INIT_GNU
|
|
|
|
# As of today only ARC MWDT toolchain doesn't support GNU-compatible
|
|
|
|
# initialization of CPP static objects, new toolchains can be added
|
|
|
|
# here if required.
|
|
|
|
def_bool "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "arcmwdt"
|
|
|
|
help
|
|
|
|
GNU-compatible initialization of CPP static objects
|
|
|
|
|
2022-12-08 22:02:24 +01:00
|
|
|
endif # CPP
|
|
|
|
|
|
|
|
rsource "Kconfig.deprecated"
|
|
|
|
|
|
|
|
endmenu
|