mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05: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
1 changed files with 3 additions and 0 deletions
|
@ -496,6 +496,9 @@ if (ENABLE_KERNEL_LTO)
|
|||
check_ipo_supported()
|
||||
add_definitions(-DENABLE_KERNEL_LTO)
|
||||
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()
|
||||
|
||||
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
|
|
Loading…
Add table
Reference in a new issue