diff --git a/CMakeLists.txt b/CMakeLists.txt index 426e899..ff90546 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,3 +80,10 @@ if(MINGW) "-static-libstdc++" ) endif() + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + target_link_options(cgss-borderless-helper PRIVATE + "-Wl,--gc-sections" + "-s" + ) +endif() diff --git a/Makefile b/Makefile index 4c068e1..97ad091 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ else CFLAGS += -O2 -ffunction-sections -fdata-sections CXXFLAGS += -O2 -ffunction-sections -fdata-sections LDFLAGS += -Wl,--gc-sections -s + HELPER_LDFLAGS += -Wl,--gc-sections -s endif C_SRCS := \