Skip to content

Commit f0aa10c

Browse files
committed
Try to fix installer size on Windows
1 parent 63b767c commit f0aa10c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
176176
case "${{ inputs.runs-on }}" in
177177
ubuntu-22.04*|windows-2022)
178-
build_runs_on="depot-${{ inputs.runs-on }}-64"
178+
build_runs_on="depot-${{ inputs.runs-on }}-16"
179179
test_runs_on=$build_runs_on
180180
;;
181181
macos-13)

clang/cmake/caches/Release.cmake

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ endfunction()
3030
#
3131
# cmake -D LLVM_RELEASE_ENABLE_PGO=ON -C Release.cmake
3232

33-
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang")
33+
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
34+
# Reduce projects built for Windows due to 2GB installer limits.
35+
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
36+
else()
37+
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang")
38+
endif()
39+
3440
# bolt only supports ELF, so only enable it for Linux.
3541
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
3642
list(APPEND DEFAULT_PROJECTS "bolt")
@@ -143,8 +149,10 @@ endif()
143149
# We want to generate an installer on Windows.
144150
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
145151
set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
146-
else()
147-
set_final_stage_var(CMAKE_OBJECT_PATH_MAX "1024" STRING)
152+
endif()
153+
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
154+
# Limit installation size on Windows to avoid 2GB installer limt.
155+
set_final_stage_var(LLVM_INSTALL_TOOLCHAIN_ONLY "ON" BOOL)
148156
endif()
149157
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
150158

0 commit comments

Comments
 (0)