[llvm-branch-commits] [llvm] ab544f6 - workflows/release-binaries: Smaller WiX installer on Windows (#219858)
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 1 01:28:45 PDT 2026
Author: Alexandre Ganea
Date: 2026-09-01T10:28:31+02:00
New Revision: ab544f643b098e783c68eac571efae3b2633d8dc
URL: https://github.com/llvm/llvm-project/commit/ab544f643b098e783c68eac571efae3b2633d8dc
DIFF: https://github.com/llvm/llvm-project/commit/ab544f643b098e783c68eac571efae3b2633d8dc.diff
LOG: 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)
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
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)
More information about the llvm-branch-commits
mailing list