From 42584c6a1400488631305d8aba6b2d0de878704c Mon Sep 17 00:00:00 2001 From: crueter Date: Sun, 2 Nov 2025 00:23:56 -0400 Subject: [PATCH] only apply to linker Signed-off-by: crueter --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cc635c8aa..b13789e9df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -899,10 +899,10 @@ endif() if (MINGW) # This saves a truly ridiculous amount of time during linking - # In my tests, without this it takes 2 mins, with it takes 10 seconds + # In my tests, without this it takes 2 mins, with it takes 3-5 seconds + # or on GitHub Actions, 10 minutes -> 3 seconds set(MINGW_FLAGS "-Wl,--strip-all -Wl,--gc-sections") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MINGW_FLAGS}") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MINGW_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${MINGW_FLAGS}") endif() add_subdirectory(src)