mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +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
2794ed0c73
commit
88991cfd2f
3 changed files with 9 additions and 7 deletions
|
@ -153,10 +153,7 @@
|
|||
"vcpkg_ci",
|
||||
"Sanitizer"
|
||||
],
|
||||
"displayName": "Sanitizer CI Config",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": ""
|
||||
}
|
||||
"displayName": "Sanitizer CI Config"
|
||||
},
|
||||
{
|
||||
"name": "Fuzzers",
|
||||
|
@ -166,7 +163,6 @@
|
|||
"binaryDir": "${fileDir}/Build/fuzzers",
|
||||
"cacheVariables": {
|
||||
"BUILD_SHARED_LIBS": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "",
|
||||
"ENABLE_QT": "OFF",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/distribution-triplets",
|
||||
"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()
|
||||
- add_cxx_compile_options(-Og)
|
||||
+ add_cxx_compile_options(-O0)
|
||||
else()
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
add_cxx_compile_options(-O2)
|
||||
if (NOT MSVC)
|
||||
EOF
|
||||
|
|
|
@ -30,11 +30,17 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||
add_cxx_compile_options(-ggdb3)
|
||||
endif()
|
||||
add_cxx_compile_options(-Og)
|
||||
else()
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
add_cxx_compile_options(-O2)
|
||||
if (NOT MSVC)
|
||||
add_cxx_compile_options(-g1)
|
||||
endif()
|
||||
else()
|
||||
add_cxx_compile_options(-O3)
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported()
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
function(add_cxx_linker_flag_if_supported flag)
|
||||
|
|
Loading…
Add table
Reference in a new issue