Merge remote-tracking branch 'origin/mueller/add-lto-support' into mueller/refactor-logging-with-fmt

This commit is contained in:
Robin Müller 2022-05-10 10:15:05 +02:00
commit eafbab9c65
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 14 additions and 0 deletions

View File

@ -46,6 +46,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Additions
- LTO support: Allow using LTO/IPO by setting `FSFW_ENABLE_LTO=1`. CMake is able to detect whether
the user compiler supports IPO/LPO. LTO is on by default now. Most modern compilers support it,
can make good use of it and it usually makes the code faster and/or smaller.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/616
- Linux HAL: Add wiretapping option for I2C. Enabled with `FSFW_HAL_I2C_WIRETAPPING` defined to 1
- Dedicated Version class and constant `fsfw::FSFW_VERSION` containing version information
inside `fsfw/version.h`

View File

@ -48,6 +48,13 @@ endif()
option(FSFW_ENABLE_IPO "Enable interprocedural optimization or link-time optimization if available" ON)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT IPO_ERROR)
if(NOT IPO_SUPPORTED)
message(STATUS "FSFW | IPO/LTO not supported: ${IPO_ERROR}")
endif()
option(FSFW_ENABLE_IPO "Enable interprocedural optimization or link-time optimization if available" ON)
option(FSFW_GENERATE_SECTIONS
"Generate function and data sections. Required to remove unused code" ON
)
@ -114,6 +121,9 @@ if(FSFW_BUILD_UNITTESTS)
project(${FSFW_TEST_TGT} CXX C)
add_executable(${FSFW_TEST_TGT})
if(IPO_SUPPORTED AND FSFW_ENABLE_IPO)
set_property(TARGET ${FSFW_TEST_TGT} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
if(FSFW_TESTS_GEN_COV)
message(STATUS "Generating coverage data for the library")
message(STATUS "Targets linking against ${LIB_FSFW_NAME} "