3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-10-29 11:22:47 +00:00

core: disable lto for hyprland builds (#11972)

LTO has the tendency to remove functions completely by inlining them, which breaks function hooks.

Force disable LTO to not have plugins break.
This commit is contained in:
Virt 2025-10-12 02:06:31 +02:00 committed by GitHub
parent d599513d4a
commit ed93643021
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,6 +95,9 @@ add_compile_options(
-Wno-clobbered
-fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=)
# disable lto as it may break plugins
add_compile_options(-fno-lto)
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)