From ea8492082a7a7d81d5166d381d49ee532749d19c Mon Sep 17 00:00:00 2001 From: JordanTheToaster Date: Fri, 17 Oct 2025 05:26:34 +0100 Subject: [PATCH] Windows: Optimize Qt build for size --- .../workflows/scripts/windows/build-dependencies-arm64.bat | 4 ++-- .github/workflows/scripts/windows/build-dependencies.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/windows/build-dependencies-arm64.bat b/.github/workflows/scripts/windows/build-dependencies-arm64.bat index a51f717895..c3fbd231d5 100644 --- a/.github/workflows/scripts/windows/build-dependencies-arm64.bat +++ b/.github/workflows/scripts/windows/build-dependencies-arm64.bat @@ -97,7 +97,7 @@ if %DEBUG%==1 ( echo Building release libraries... ) -set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" +set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL="/DEBUG" set ARM64TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE="%SCRIPTDIR%\cmake-toolchain-windows-arm64.cmake" echo Building Zlib... @@ -199,7 +199,7 @@ cd .. || goto error if %DEBUG%==1 ( set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config" ) else ( - set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja + set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=MinSizeRel -G Ninja ) echo Building Qt base... diff --git a/.github/workflows/scripts/windows/build-dependencies.bat b/.github/workflows/scripts/windows/build-dependencies.bat index 9ef25c66d3..86edd5e824 100644 --- a/.github/workflows/scripts/windows/build-dependencies.bat +++ b/.github/workflows/scripts/windows/build-dependencies.bat @@ -95,7 +95,7 @@ if %DEBUG%==1 ( echo Building release libraries... ) -set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="/DEBUG" +set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_MINSIZEREL="/DEBUG" echo Building Zlib... rmdir /S /Q "zlib-%ZLIB%" @@ -196,7 +196,7 @@ cd .. || goto error if %DEBUG%==1 ( set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config" ) else ( - set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja + set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=MinSizeRel -G Ninja ) echo Building Qt base...