mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00:00
Meta: Add an option to disable LTO for Release builds
This commit is contained in:
parent
fac2ee4452
commit
0a958c8e16
Notes:
github-actions[bot]
2025-04-08 12:02:37 +00:00
Author: https://github.com/alimpfard
Commit: 0a958c8e16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4256
Reviewed-by: https://github.com/R-Goc
2 changed files with 9 additions and 6 deletions
|
@ -38,6 +38,7 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
else()
|
else()
|
||||||
add_cxx_compile_options(-O3)
|
add_cxx_compile_options(-O3)
|
||||||
|
|
||||||
|
if (ENABLE_LTO_FOR_RELEASE)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
check_ipo_supported(RESULT IPO_AVAILABLE OUTPUT output)
|
check_ipo_supported(RESULT IPO_AVAILABLE OUTPUT output)
|
||||||
if(IPO_AVAILABLE)
|
if(IPO_AVAILABLE)
|
||||||
|
@ -45,6 +46,7 @@ else()
|
||||||
else()
|
else()
|
||||||
message(WARNING "Not enabling IPO as it is not supported: ${output}")
|
message(WARNING "Not enabling IPO as it is not supported: ${output}")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(add_cxx_linker_flag_if_supported flag)
|
function(add_cxx_linker_flag_if_supported flag)
|
||||||
|
|
|
@ -14,6 +14,7 @@ serenity_option(LAGOM_TOOLS_ONLY OFF CACHE BOOL "Don't build libraries, utilitie
|
||||||
serenity_option(ENABLE_LAGOM_CCACHE ON CACHE BOOL "Enable ccache for Lagom builds")
|
serenity_option(ENABLE_LAGOM_CCACHE ON CACHE BOOL "Enable ccache for Lagom builds")
|
||||||
serenity_option(LAGOM_USE_LINKER "" CACHE STRING "The linker to use (e.g. lld, mold) instead of the system default")
|
serenity_option(LAGOM_USE_LINKER "" CACHE STRING "The linker to use (e.g. lld, mold) instead of the system default")
|
||||||
serenity_option(LAGOM_LINK_POOL_SIZE "" CACHE STRING "The maximum number of parallel jobs to use for linking")
|
serenity_option(LAGOM_LINK_POOL_SIZE "" CACHE STRING "The maximum number of parallel jobs to use for linking")
|
||||||
|
serenity_option(ENABLE_LTO_FOR_RELEASE ON CACHE BOOL "Enable link-time optimization for release builds")
|
||||||
serenity_option(ENABLE_LAGOM_COVERAGE_COLLECTION OFF CACHE STRING "Enable code coverage instrumentation for lagom binaries in clang")
|
serenity_option(ENABLE_LAGOM_COVERAGE_COLLECTION OFF CACHE STRING "Enable code coverage instrumentation for lagom binaries in clang")
|
||||||
|
|
||||||
if (ANDROID OR APPLE)
|
if (ANDROID OR APPLE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue