From 1d77158f293bf616e392a7640797ba1ca72f3d42 Mon Sep 17 00:00:00 2001 From: whitecum1488 Date: Fri, 3 Jul 2026 00:24:06 +0300 Subject: [PATCH] Optimizations for steamshim --- steamshim_parent/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/steamshim_parent/CMakeLists.txt b/steamshim_parent/CMakeLists.txt index 12d94e9..fbd218c 100644 --- a/steamshim_parent/CMakeLists.txt +++ b/steamshim_parent/CMakeLists.txt @@ -5,8 +5,14 @@ set(GAME_LAUNCH_NAME "oneshot" CACHE STRING "Game launch name") option(DEBUG "Debug" OFF) if(DEBUG) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -O0 -fno-omit-frame-pointer -ggdb") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -O0 -fno-omit-frame-pointer -ggdb") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") +else() + add_compile_options(-O2 -ffast-math -fipa-pta -ftree-vectorize -fstdarg-opt -fomit-frame-pointer -frename-registers -ffunction-sections -fdata-sections -fvisibility=hidden) + add_link_options(-Wl,-O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--strip-debug -Wl,--no-undefined) + if(!WIN32) + add_compile_options(-flto) + endif() endif() set(SOURCES