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,12 +38,14 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
|||
else()
|
||||
add_cxx_compile_options(-O3)
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_AVAILABLE OUTPUT output)
|
||||
if(IPO_AVAILABLE)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "Not enabling IPO as it is not supported: ${output}")
|
||||
if (ENABLE_LTO_FOR_RELEASE)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_AVAILABLE OUTPUT output)
|
||||
if(IPO_AVAILABLE)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "Not enabling IPO as it is not supported: ${output}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -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(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(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")
|
||||
|
||||
if (ANDROID OR APPLE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue