mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
Kernel: Add a CMake flag to enable LTO for the kernel
This commit is contained in:
parent
55ae52fdf8
commit
6288ae2c37
2 changed files with 8 additions and 2 deletions
|
@ -361,6 +361,11 @@ else()
|
|||
endif()
|
||||
|
||||
add_executable(Kernel ${SOURCES})
|
||||
if (ENABLE_KERNEL_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported()
|
||||
set_property(TARGET Kernel PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
target_link_libraries(Kernel kernel_heap gcc stdc++)
|
||||
add_dependencies(Kernel boot kernel_heap)
|
||||
install(TARGETS Kernel RUNTIME DESTINATION boot)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue