https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/219984
Backport dee1f43598034a63b3de521032bb894b33152b1c Requested by: @aganea >From 9e09ff6f2a033f8bf2846ea312a4712c0110eb40 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea <[email protected]> Date: Mon, 31 Aug 2026 09:49:53 -0400 Subject: [PATCH] workflows/release-binaries: Smaller WiX installer on Windows (#219858) Reduce WiX installer size by using LZX compression instead of MSZIP previously. Tested on `release/23.x` at commit fdf0409c656cc66c61b14d71c831f2b453c13e19 targetting Win64: - MSZIP: 779 MiB - LZX: 613 MiB (cherry picked from commit dee1f43598034a63b3de521032bb894b33152b1c) --- llvm/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 7b8f1b3b3ced9..9340cd6c4501f 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -508,8 +508,14 @@ if(WIN32 AND NOT UNIX) endif() if(CPACK_GENERATOR STREQUAL "WIX") set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_icon.ico") - # The WIX installer needs admin privileges unless we use this flag. - set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval") + # -sval: the WIX installer needs admin privileges unless we use this flag. + # -dcl:high: light defaults the cabinet to MSZIP (deflate, 32 KiB window), + # which captures almost no redundancy between the payload's binaries. high + # selects LZX with a 21-bit (2 MiB) window instead. That is the strongest + # compression available here: Windows Installer has to be able to read the + # cabinet itself, and CAB supports only MSZIP/LZX/Quantum, so an MSI cannot + # use LZMA the way the NSIS generator does. + set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-sval" "-dcl:high") endif() endif() include(CPack) _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
