From e6cc4b14b0eb603001e968be9b1ace8a09e1bce1 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 16 Jul 2023 15:46:50 +0200 Subject: [PATCH] Work around a strange bug in Qt5 that causes melonDS to crash on launch ...but only with LTO enabled ...but only on some UNIX systems ...but only with some additional build options except when it breaks without any as well --- src/frontend/qt_sdl/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index 0ae6ecea..24261030 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -222,4 +222,10 @@ if (UNIX AND NOT APPLE) install(FILES ${CMAKE_SOURCE_DIR}/res/net.kuribo64.melonDS.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) install(TARGETS melonDS BUNDLE DESTINATION ${CMAKE_BINARY_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + if (NOT USE_QT6) + set_target_properties(melonDS PROPERTIES + INTERPROCEDURAL_OPTIMIZATION OFF + INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF) + endif() endif()