mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 11:03:56 +00:00
Fix LTO linking issues on CachyOS with GCC 15.x - Add LTO support to all core library targets (input_common, frontend_common, network, shader_recompiler, web_service) that were missing LTO configuration - Create citron_configure_lto() helper function for consistent LTO handling - Implement CachyOS-specific detection via /etc/os-release and kernel version - Apply conservative LTO flags (-flto=auto -ffat-lto-objects) only for CachyOS + GCC 15+ to resolve linking errors with newer toolchains - Other distributions continue using aggressive LTO settings for maximum performance - Disable LTO on executable targets to prevent main function optimization issues This resolves "undefined symbol" errors when building with -DCITRON_ENABLE_LTO=ON on CachyOS while maintaining optimal LTO performance on other distributions. Fixes linking errors including: - Core::Frontend::EmuWindow symbols - Core::System methods - Settings::values - Common logging functions Tested on CachyOS with GCC 15.1.1 + LLD 20.1.8 Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>