From ed936430216e7aa5f6f53d22eff713f8e9ed69ac Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Sun, 12 Oct 2025 02:06:31 +0200 Subject: [PATCH] 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. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4822bc69..3ab34211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)