mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
Meta: Make the "Release" build type use -O3 and -flto
This doesn't affect the default preset, but the Distribution preset will now compile with these flags instead.
This commit is contained in:
parent
da09608156
commit
3bc6870bbf
Notes:
github-actions[bot]
2025-04-01 11:45:01 +00:00
Author: https://github.com/gmta
Commit: 3bc6870bbf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4098
3 changed files with 9 additions and 7 deletions
|
@ -153,10 +153,7 @@
|
||||||
"vcpkg_ci",
|
"vcpkg_ci",
|
||||||
"Sanitizer"
|
"Sanitizer"
|
||||||
],
|
],
|
||||||
"displayName": "Sanitizer CI Config",
|
"displayName": "Sanitizer CI Config"
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": ""
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Fuzzers",
|
"name": "Fuzzers",
|
||||||
|
@ -166,7 +163,6 @@
|
||||||
"binaryDir": "${fileDir}/Build/fuzzers",
|
"binaryDir": "${fileDir}/Build/fuzzers",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"BUILD_SHARED_LIBS": "OFF",
|
"BUILD_SHARED_LIBS": "OFF",
|
||||||
"CMAKE_BUILD_TYPE": "",
|
|
||||||
"ENABLE_QT": "OFF",
|
"ENABLE_QT": "OFF",
|
||||||
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/distribution-triplets",
|
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/distribution-triplets",
|
||||||
"ENABLE_FUZZERS_LIBFUZZER": "ON",
|
"ENABLE_FUZZERS_LIBFUZZER": "ON",
|
||||||
|
|
|
@ -123,7 +123,7 @@ If you do run into such an error, the rest of this section explains how to deal
|
||||||
endif()
|
endif()
|
||||||
- add_cxx_compile_options(-Og)
|
- add_cxx_compile_options(-Og)
|
||||||
+ add_cxx_compile_options(-O0)
|
+ add_cxx_compile_options(-O0)
|
||||||
else()
|
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
add_cxx_compile_options(-O2)
|
add_cxx_compile_options(-O2)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -30,11 +30,17 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
add_cxx_compile_options(-ggdb3)
|
add_cxx_compile_options(-ggdb3)
|
||||||
endif()
|
endif()
|
||||||
add_cxx_compile_options(-Og)
|
add_cxx_compile_options(-Og)
|
||||||
else()
|
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
add_cxx_compile_options(-O2)
|
add_cxx_compile_options(-O2)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
add_cxx_compile_options(-g1)
|
add_cxx_compile_options(-g1)
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
add_cxx_compile_options(-O3)
|
||||||
|
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported()
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(add_cxx_linker_flag_if_supported flag)
|
function(add_cxx_linker_flag_if_supported flag)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue