[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 10:23:10 PST 2025


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274

>From 29b82de7c0ac1cd008a5ddc79c42f5cd492694a7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 22 Feb 2025 03:08:24 +0000
Subject: [PATCH 1/2] workflows/release-binaries: Enable Windows x86 builds

---
 .github/workflows/release-binaries-all.yml |  1 +
 .github/workflows/release-binaries.yml     | 17 +++++++++++------
 clang/cmake/caches/Release.cmake           |  5 ++++-
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index fd4694ebea32d..539dae9f89a18 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -90,6 +90,7 @@ jobs:
           - ubuntu-22.04-arm
           - macos-13
           - macos-14
+          - windows-2019
 
     uses: ./.github/workflows/release-binaries.yml
     with:
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 64d59a5a6449d..541e1cc572ca4 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -116,9 +116,15 @@ jobs:
         echo "ref=$ref" >> $GITHUB_OUTPUT
         echo "upload=$upload" >> $GITHUB_OUTPUT
 
+        if [ "$RUNNER_OS" = "Windows" ]; then
+          release_binary_suffix="exe"
+        else
+          release_binary_suffix="tar.xz"
+        fi
+
         release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH"
         echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
-        echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
+        echo "release-binary-filename=$release_binary_basename.$release_binary_suffix" >> $GITHUB_OUTPUT
 
         target="$RUNNER_OS-$RUNNER_ARCH"
         # The hendrikmuhs/ccache-action action does not support installing sccache
@@ -149,11 +155,6 @@ jobs:
 
         build_flang="true"
 
-        if [ "$RUNNER_OS" = "Windows" ]; then
-          # The build times out on Windows, so we need to disable LTO.
-          target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
-        fi
-
         echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
         echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
         case "${{ inputs.runs-on }}" in
@@ -177,6 +178,10 @@ jobs:
             fi
             test_runs_on="${{ inputs.runs-on }}"
             ;;
+          windows-2019)
+            build_runs_on="llvm-premerge-windows-runners"
+            test_runs_on="$build_runs_on"
+            ;;
           *)
             test_runs_on="${{ inputs.runs-on }}"
             build_runs_on=$test_runs_on
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index a1c68fc51dbd0..0a7f5c34fd8a2 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -125,7 +125,10 @@ set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FL
 # Final Stage Config (stage2)
 set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)
 set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRING)
-set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
++# We want to generate an installer on Windows.
+if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
+  set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
+endif()
 set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
 
 if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")

>From 26bdc23963853b7811d83c8ebb2c9eb10e89b1a4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 24 Feb 2025 18:17:47 +0000
Subject: [PATCH 2/2] Fix typo

---
 clang/cmake/caches/Release.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index 0a7f5c34fd8a2..9bb0bb8548b50 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -125,7 +125,7 @@ set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FL
 # Final Stage Config (stage2)
 set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)
 set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRING)
-+# We want to generate an installer on Windows.
+# We want to generate an installer on Windows.
 if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
   set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
 endif()



More information about the llvm-commits mailing list