Re-enable LTO for gcc versions >= 10

Assume the related GCC version is fixed.

Fixes: QTBUG-118851
Change-Id: I0160440c5e8a0341ec5bc2ab9ea6fed9a2325bba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Alexey Edelev 2023-11-07 16:16:24 +01:00
parent 295e56201d
commit c8c8299a63
1 changed files with 8 additions and 4 deletions

View File

@ -464,11 +464,15 @@ qt_internal_extend_target(Core
SOURCES ${core_version_tagging_files}
)
# Disable LTO, as the symbols disappear somehow under GCC
# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200)
if(GCC)
set_source_files_properties(${core_version_tagging_files}
PROPERTIES COMPILE_OPTIONS "-fno-lto")
# Disable LTO, as the symbols disappear somehow under GCC
# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200)
# The issue should be fixed in GCC >= 10
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set_source_files_properties(${core_version_tagging_files}
PROPERTIES COMPILE_OPTIONS "-fno-lto")
endif()
endif()
qt_internal_extend_target(Core