Skip to content

Commit 2110f92

Browse files
committed
workflows/release-binaries: Enable Windows x86 builds
1 parent 69d0078 commit 2110f92

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/workflows/release-binaries-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
- ubuntu-22.04-arm
9393
- macos-13
9494
- macos-14
95+
- windows-2019
9596

9697
uses: ./.github/workflows/release-binaries.yml
9798
with:

.github/workflows/release-binaries.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,15 @@ jobs:
118118
echo "ref=$ref" >> $GITHUB_OUTPUT
119119
echo "upload=$upload" >> $GITHUB_OUTPUT
120120
121+
if [ "$RUNNER_OS" = "Windows" ]; then
122+
release_binary_suffix="exe"
123+
else
124+
release_binary_suffix="tar.xz"
125+
fi
126+
121127
release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH"
122128
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
123-
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
129+
echo "release-binary-filename=$release_binary_basename.$release_binary_suffix" >> $GITHUB_OUTPUT
124130
125131
target="$RUNNER_OS-$RUNNER_ARCH"
126132
# The hendrikmuhs/ccache-action action does not support installing sccache
@@ -151,11 +157,6 @@ jobs:
151157
152158
build_flang="true"
153159
154-
if [ "$RUNNER_OS" = "Windows" ]; then
155-
# The build times out on Windows, so we need to disable LTO.
156-
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
157-
fi
158-
159160
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
160161
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
161162
case "${{ inputs.runs-on }}" in
@@ -179,6 +180,10 @@ jobs:
179180
fi
180181
test_runs_on="${{ inputs.runs-on }}"
181182
;;
183+
windows-2019)
184+
build_runs_on="llvm-premerge-windows-runners"
185+
test_runs_on="$build_runs_on"
186+
;;
182187
*)
183188
test_runs_on="${{ inputs.runs-on }}"
184189
build_runs_on=$test_runs_on

clang/cmake/caches/Release.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRIN
140140
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
141141
set_final_stage_var(CLANG_BOLT "INSTRUMENT" STRING)
142142
endif()
143-
set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
143+
+# We want to generate an installer on Windows.
144+
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
145+
set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
146+
endif()
144147
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
145148

146149
set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL)

0 commit comments

Comments
 (0)