mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Enable LTO for kernel_heap if ENABLE_KERNEL_LTO
is set
By enabling LTO for the kernel_heap object too, we open the door for optimization opportunities that come from (partially) inlining `::new` or kmalloc. Every software spends a non-trivial amount of its run time on allocating memory, so hopefully this change will make LTO builds even faster.
This commit is contained in:
parent
06fc64be13
commit
10c3cf9a47
Notes:
sideshowbarker
2024-07-18 02:14:22 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/10c3cf9a47f Pull-request: https://github.com/SerenityOS/serenity/pull/9378 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/itamar8910 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/nico Reviewed-by: https://github.com/timschumi
1 changed files with 3 additions and 0 deletions
|
@ -496,6 +496,9 @@ if (ENABLE_KERNEL_LTO)
|
||||||
check_ipo_supported()
|
check_ipo_supported()
|
||||||
add_definitions(-DENABLE_KERNEL_LTO)
|
add_definitions(-DENABLE_KERNEL_LTO)
|
||||||
set_property(TARGET Kernel PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
set_property(TARGET Kernel PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||||
|
set_property(TARGET kernel_heap PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
|
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||||
|
|
Loading…
Reference in a new issue