esp-idf/tools/cmake
Ivan Grokhotkov 3d0466ccd1 C++: add provisions for optional RTTI support
Ref. https://github.com/espressif/esp-idf/issues/1684

This change allows RTTI to be enabled in menuconfig. For full RTTI
support, libstdc++.a in the toolchain should be built without
-fno-rtti, as it is done now.

Generally if libstdc++.a is built with RTTI, applications which do not
use RTTI (and build with -fno-rtti) could still include typeinfo
structures referenced from STL classes’ vtables. This change works
around this, by moving all typeinfo structures from libstdc++.a into
a non-loadable section, placed into a non-existent memory region
starting at address 0. This can be done because when the application
is compiled with -fno-rtti, typeinfo structures are not used at run
time. This way, typeinfo structures do not contribute to the
application binary size.

If the application is build with RTTI support, typeinfo structures are
linked into the application .rodata section as usual.

Note that this commit does not actually enable RTTI support.
The respective Kconfig option is hidden, and will be made visible when
the toolchain is updated.
2019-10-18 11:22:39 +02:00
..
scripts cmake: set COMPONENT_DIR in early expansion 2019-07-12 16:22:18 +08:00
third_party cmake: fix build failure when git repo is initialized but no first commit 2019-08-28 10:28:17 +08:00
build.cmake C++: add provisions for optional RTTI support 2019-10-18 11:22:39 +02:00
component.cmake Merge branch 'bugfix/various_cmake_fixes_v4.0' into 'release/v4.0' 2019-09-02 12:46:40 +08:00
convert_to_cmake.py tools: update make converter to use new component registration api 2019-06-21 19:53:29 +08:00
crosstool_version_check.cmake cmake: fix crosstool-NG version check regex 2019-06-10 09:51:40 +00:00
git_submodules.cmake cmake: Use cmake_lint project, tidy up all CMake source files 2018-04-30 09:59:20 +10:00
idf.cmake esp_common: add version definitions in code and build system 2019-05-20 13:14:56 +08:00
kconfig.cmake cmake: check mconf-idf binary version 2019-09-10 17:15:15 +02:00
ldgen.cmake cmake: Use environment variables file for all config binaries 2019-07-01 15:54:27 +10:00
project_description.json.in Rename Kconfig options (components/esptool_py) 2019-05-21 09:32:55 +02:00
project.cmake cmake: make default version 1 2019-08-28 10:28:17 +08:00
run_cmake_lint.sh Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
targets.cmake Fix cmake typo 2019-10-10 09:11:01 +02:00
toolchain-esp32.cmake cmake: For gcc8 use linker to find paths to libc, libm, libstdc++, etc 2019-05-28 12:54:37 +08:00
utilities.cmake cmake: fix issue with fail at build time 2019-06-28 10:54:21 +08:00
version.cmake esp_common: add version definitions in code and build system 2019-05-20 13:14:56 +08:00