Allow QCC inherit IPO support from GCC and remove forced limitation
In Modules/Compiler/QCC.cmake
, a limitation that removes IPO support for QCC is imposed. QCC inherits the same capabilities from GCC regarding IPO support and therefore, the following lines should be removed from Modules/Compiler/QCC.cmake
enabling the same level of support that GCC offers.
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE NO)
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
unset(CMAKE_${lang}_COMPILE_OPTIONS_IPO)
unset(CMAKE_${lang}_ARCHIVE_CREATE_IPO)
unset(CMAKE_${lang}_ARCHIVE_APPEND_IPO)
unset(CMAKE_${lang}_ARCHIVE_FINISH_IPO)
A simple hello world program linked with -flto
proves that IPO/LTO is supported by QCC in the same versioning that GCC.
Edited by Pablo Romero