[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 13:50:16 PDT 2025
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274
>From 2110f92892dd72dfbe1a7d87116faa3693c7c586 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 01/53] 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 0b52a08202f1a..4e67b44ccbad3 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -92,6 +92,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 c113b42dc8ed4..2854fd36e31aa 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -118,9 +118,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
@@ -151,11 +157,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
@@ -179,6 +180,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 fb12dfcdcb5a5..595552985b788 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -140,7 +140,10 @@ set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRIN
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
set_final_stage_var(CLANG_BOLT "INSTRUMENT" STRING)
endif()
-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)
set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL)
>From a0313b17419ef01b13d236852a8b242b8680a603 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 02/53] 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 595552985b788..cd84df263cf1b 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -140,7 +140,7 @@ set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRIN
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
set_final_stage_var(CLANG_BOLT "INSTRUMENT" STRING)
endif()
-+# 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()
>From 434b4f8d567c0df39032a99d1c9281fc7a337f89 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 24 Feb 2025 18:37:28 +0000
Subject: [PATCH 03/53] Disable unsupported runtimes
---
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 cd84df263cf1b..a2b9853b5c7e8 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -56,7 +56,7 @@ set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
set(STAGE1_PROJECTS "clang")
# Build all runtimes so we can statically link them into the stage2 compiler.
-set(STAGE1_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind")
+set(STAGE1_RUNTIMES ${DEFAULT_RUNTIMES})
if (LLVM_RELEASE_ENABLE_PGO)
list(APPEND STAGE1_PROJECTS "lld")
>From 1854aedd4031b32e2656dc20421f78aa861a0ab5 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 26 Jul 2025 22:42:08 -0700
Subject: [PATCH 04/53] Windows-2022
---
.github/workflows/release-binaries-all.yml | 2 +-
.github/workflows/release-binaries.yml | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 4e67b44ccbad3..4be18c50be9c3 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -92,7 +92,7 @@ jobs:
- ubuntu-22.04-arm
- macos-13
- macos-14
- - windows-2019
+ - windows-2022
uses: ./.github/workflows/release-binaries.yml
with:
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 2854fd36e31aa..be65e8a5378d4 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -161,6 +161,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*)
+ windows-2022)
build_runs_on="depot-${{ inputs.runs-on }}-16"
test_runs_on=$build_runs_on
;;
@@ -180,10 +181,6 @@ 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
>From ecf2b179e776c394c97ceb2016baed81e18fd387 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 26 Jul 2025 22:42:58 -0700
Subject: [PATCH 05/53] Windows fixes
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index be65e8a5378d4..7da7723b99ffa 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -23,6 +23,7 @@ on:
- ubuntu-22.04-arm
- macos-13
- macos-14
+ - windows-2022
workflow_call:
inputs:
>From 03222fcc67847c4f292a3916067a986c6ec03777 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 26 Jul 2025 22:43:54 -0700
Subject: [PATCH 06/53] XXX: Debug
---
.github/workflows/release-binaries-all.yml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 4be18c50be9c3..e9a2f7fb295cc 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -88,10 +88,6 @@ jobs:
# We use ubuntu-22.04 rather than the latest version to make the built
# binaries more portable (eg functional aginast older glibc).
runs-on:
- - ubuntu-22.04
- - ubuntu-22.04-arm
- - macos-13
- - macos-14
- windows-2022
uses: ./.github/workflows/release-binaries.yml
>From bd8b14996a66085d0d65131043a3e5c9c2c6e749 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 26 Jul 2025 22:50:16 -0700
Subject: [PATCH 07/53] Fix
---
.github/workflows/release-binaries.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 7da7723b99ffa..e60042ff73169 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -161,8 +161,7 @@ jobs:
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
- ubuntu-22.04*)
- windows-2022)
+ ubuntu-22.04*|windows-2022)
build_runs_on="depot-${{ inputs.runs-on }}-16"
test_runs_on=$build_runs_on
;;
>From 59f41863397c6406165957668864fa8df091791b Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 1 Aug 2025 15:38:39 -0700
Subject: [PATCH 08/53] Update Release.cmake
---
clang/cmake/caches/Release.cmake | 2 ++
1 file changed, 2 insertions(+)
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index a2b9853b5c7e8..97f7439f21b47 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -143,6 +143,8 @@ endif()
# We want to generate an installer on Windows.
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
+else()
+ set_final_stage_var(CMAKE_OBJECT_PATH_MAX "1024" STRING)
endif()
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
>From 2c0e6ee1d7b287035f48f7a3b830ab3310803502 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 10:40:35 -0700
Subject: [PATCH 09/53] Update release-binaries.yml
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index e60042ff73169..a6cfa8c7dfa46 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -162,7 +162,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*|windows-2022)
- build_runs_on="depot-${{ inputs.runs-on }}-16"
+ build_runs_on="depot-${{ inputs.runs-on }}-64"
test_runs_on=$build_runs_on
;;
macos-13)
>From f258bbcf2c2602a2009949bda1a1fd7e5a94dd4b Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 11:25:25 -0700
Subject: [PATCH 10/53] Update release-binaries.yml
---
.github/workflows/release-binaries.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index a6cfa8c7dfa46..d9ca453c06305 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -90,6 +90,9 @@ jobs:
run: |
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions
+ - name: Check long paths
+ run: |
+ Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
- name: Collect Variables
id: vars
shell: bash
>From 7f27ea05dca5df0bfa07fab27e5eacf77b25bec5 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 11:29:05 -0700
Subject: [PATCH 11/53] Update release-binaries.yml
---
.github/workflows/release-binaries.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index d9ca453c06305..5bfe2ebab55af 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -198,7 +198,9 @@ jobs:
if: github.repository_owner == 'llvm'
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
steps:
-
+ - name: Check long paths
+ run: |
+ Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
- name: Checkout Actions
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
>From a7a241767d7ec6bb60f095de241823d0ba9aa565 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 12:06:11 -0700
Subject: [PATCH 12/53] Use powershell for windows
---
.github/workflows/release-binaries.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 5bfe2ebab55af..fb81189ab8778 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -250,12 +250,20 @@ jobs:
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- - name: Build
+ - name: Build Unix
shell: bash
+ if: ${{ runner.os }} != "Windows"
run: |
ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
+
+ # There is an issue with building on Windows with bash so we use power shell.
+ # ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
+ - name: Build Windows
+ if: ${{ runner.os }} == "Windows"
+ run: |
+ ninja -v -C build stage2-package
- uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
>From 82c2fa50260f16cebb766f8a5aec03da4585e294 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 12:09:01 -0700
Subject: [PATCH 13/53] Fix
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index fb81189ab8778..24cb607b878a4 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -165,7 +165,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*|windows-2022)
- build_runs_on="depot-${{ inputs.runs-on }}-64"
+ build_runs_on="depot-${{ inputs.runs-on }}-16"
test_runs_on=$build_runs_on
;;
macos-13)
>From a884e0d6b935c9120236cd58410e89de6f881175 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 14:39:40 -0700
Subject: [PATCH 14/53] Fix
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 24cb607b878a4..8c42209e2a46d 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -252,7 +252,7 @@ jobs:
- name: Build Unix
shell: bash
- if: ${{ runner.os }} != "Windows"
+ if: runner.os != "Windows"
run: |
ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
@@ -261,7 +261,7 @@ jobs:
# There is an issue with building on Windows with bash so we use power shell.
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
- name: Build Windows
- if: ${{ runner.os }} == "Windows"
+ if: runner.os == "Windows"
run: |
ninja -v -C build stage2-package
>From eb74e4139f55faa27e409904f58559e8c04b519e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 4 Aug 2025 14:41:17 -0700
Subject: [PATCH 15/53] Fix
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 8c42209e2a46d..64d6298f4c4d2 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -252,7 +252,7 @@ jobs:
- name: Build Unix
shell: bash
- if: runner.os != "Windows"
+ if: runner.os != 'Windows'
run: |
ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
@@ -261,7 +261,7 @@ jobs:
# There is an issue with building on Windows with bash so we use power shell.
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
- name: Build Windows
- if: runner.os == "Windows"
+ if: runner.os == 'Windows'
run: |
ninja -v -C build stage2-package
>From 617a2f847fd962a8f082f9fd2a72b1456002a350 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 11 Aug 2025 13:45:06 -0700
Subject: [PATCH 16/53] XXX:Debug
---
.github/workflows/release-binaries.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 64d6298f4c4d2..2ef81c6c0e45f 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -67,6 +67,8 @@ jobs:
test-runs-on: ${{ steps.vars.outputs.build-runs-on }}
steps:
+ - run: |
+ New-Item -Path "c:\actions-runner/llvm-project/llvm-project/build/tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm" -ItemType Directory
# It's good practice to use setup-python, but this is also required on macos-14
# due to https://github.com/actions/runner-images/issues/10385
- uses: actions/setup-python at 39cd14951b08e74b54015e9e001cdefcf80e669f
>From 437f42e525a34b83963232580a871b2458e56f3c Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 11 Aug 2025 13:48:28 -0700
Subject: [PATCH 17/53] XXX: Debug
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 2ef81c6c0e45f..bbb2997afa3f5 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -68,7 +68,7 @@ jobs:
steps:
- run: |
- New-Item -Path "c:\actions-runner/llvm-project/llvm-project/build/tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm" -ItemType Directory
+ New-Item -Path "c:\actions-runner\llvm-project\llvm-project\build\tools\clang\tools\extra\clang-tidy\misc\ConfusableTable\CMakeFiles\clang-tidy-confusable-chars-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm" -ItemType Directory
# It's good practice to use setup-python, but this is also required on macos-14
# due to https://github.com/actions/runner-images/issues/10385
- uses: actions/setup-python at 39cd14951b08e74b54015e9e001cdefcf80e669f
>From 0f322ee3ba7aa19336cf699d6dcdf1cd1ec6c83f Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 11 Aug 2025 13:56:13 -0700
Subject: [PATCH 18/53] Fix
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index bbb2997afa3f5..a5040b0d4f066 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -250,6 +250,7 @@ jobs:
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
+ -DCMAKE_OBJECT_PATH_MAX=250 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From df7e14c87b650c54cea257194eb5f4c8dc1eb05a Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 11 Aug 2025 20:43:33 -0700
Subject: [PATCH 19/53] Fix
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index a5040b0d4f066..421b2251a0955 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -250,7 +250,7 @@ jobs:
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
- -DCMAKE_OBJECT_PATH_MAX=250 \
+ -DCMAKE_OBJECT_PATH_MAX=450 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From 15b9477abbbdd461b5bfd15878cc1d612bc6f240 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 12 Aug 2025 03:39:06 -0700
Subject: [PATCH 20/53] Check diskspace
---
.github/workflows/release-binaries.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 421b2251a0955..b30fd79906aee 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -288,6 +288,11 @@ jobs:
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
+ - name: Check Disk
+ if: always()
+ run: |
+ Get-WmiObject -Class Win32_LogicalDisk -ComputerName <Server_Name> | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB}
+
upload-release-binaries:
name: "Upload Release Binaries"
needs:
>From c4aa68d61e456146ea461b5b288860c4178afbe3 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 12 Aug 2025 13:01:05 -0700
Subject: [PATCH 21/53] Debug
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index b30fd79906aee..a4b5f63f1af8a 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -291,7 +291,7 @@ jobs:
- name: Check Disk
if: always()
run: |
- Get-WmiObject -Class Win32_LogicalDisk -ComputerName <Server_Name> | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB}
+ Get-WmiObject -Class Win32_LogicalDisk -ComputerName LOCALHOST | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB}
upload-release-binaries:
name: "Upload Release Binaries"
>From f97b69ba7f61edd9bb59f5b5dab8c77465919d13 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 14:45:30 -0700
Subject: [PATCH 22/53] Debug
---
.github/workflows/release-binaries.yml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index a4b5f63f1af8a..fcc2132107319 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -67,8 +67,10 @@ jobs:
test-runs-on: ${{ steps.vars.outputs.build-runs-on }}
steps:
- - run: |
- New-Item -Path "c:\actions-runner\llvm-project\llvm-project\build\tools\clang\tools\extra\clang-tidy\misc\ConfusableTable\CMakeFiles\clang-tidy-confusable-chars-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm" -ItemType Directory
+ - name: Check long paths
+ run: |
+ Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
+ New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
# It's good practice to use setup-python, but this is also required on macos-14
# due to https://github.com/actions/runner-images/issues/10385
- uses: actions/setup-python at 39cd14951b08e74b54015e9e001cdefcf80e669f
@@ -92,9 +94,6 @@ jobs:
run: |
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions
- - name: Check long paths
- run: |
- Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
- name: Collect Variables
id: vars
shell: bash
@@ -203,6 +202,7 @@ jobs:
- name: Check long paths
run: |
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
+ New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
- name: Checkout Actions
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
>From 4b16d69753f7fc5fec06e8ef1728771c1f8afb83 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 14:50:38 -0700
Subject: [PATCH 23/53] Fix
---
.github/workflows/release-binaries.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index fcc2132107319..3f657a00de4b8 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -251,6 +251,8 @@ jobs:
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_OBJECT_PATH_MAX=450 \
+ -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=450 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=450 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From db48c6abdf8aaa3aaeeed15a146d133a27616022 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 16:32:05 -0700
Subject: [PATCH 24/53] Debug
---
llvm/utils/lit/lit/TestRunner.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index 73db67aedb739..2e8fcccbadf8d 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -1078,6 +1078,7 @@ def executeScriptInternal(
test, litConfig, tmpBase, commands, cwd, debug=True
) -> Tuple[str, str, int, Optional[str]]:
cmds = []
+ print(test, commands)
for i, ln in enumerate(commands):
# Within lit, we try to always add '%dbg(...)' to command lines in order
# to maximize debuggability. However, custom lit test formats might not
@@ -1107,6 +1108,7 @@ def executeScriptInternal(
) from None
cmd = cmds[0]
+ print(cmds)
for c in cmds[1:]:
cmd = ShUtil.Seq(cmd, "&&", c)
>From 9fe8287175ce81ba7c99dc41a5807862477c70c9 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 16:38:14 -0700
Subject: [PATCH 25/53] Debug
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 3f657a00de4b8..b79b5fdf27485 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -69,6 +69,7 @@ jobs:
steps:
- name: Check long paths
run: |
+ Get-ChildItem -Path "C:\" -Recurse -Include "cmake.exe"
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
# It's good practice to use setup-python, but this is also required on macos-14
>From 67c077576d14eedf72f5f54a4cb0a98827061ebc Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 17:27:22 -0700
Subject: [PATCH 26/53] Debug
---
.github/workflows/release-binaries.yml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index b79b5fdf27485..1afc7266fa1b6 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -67,9 +67,15 @@ jobs:
test-runs-on: ${{ steps.vars.outputs.build-runs-on }}
steps:
+ - name: Bash Test
+ shell: bash
+ run: |
+ export PATH=C:\Strawberry\c\bin\:$PATH
+ cmake --version
+ which cmake
- name: Check long paths
run: |
- Get-ChildItem -Path "C:\" -Recurse -Include "cmake.exe"
+ #Get-ChildItem -Path "C:\" -Recurse -Include "cmake.exe"
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
# It's good practice to use setup-python, but this is also required on macos-14
@@ -247,6 +253,7 @@ jobs:
run: |
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
+ export PATH=C:\Strawberry\c\bin\:$PATH
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
>From 45076725898e51f3635b1184a89c92781ec09d0d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 17:32:20 -0700
Subject: [PATCH 27/53] Debug
---
.github/workflows/release-binaries.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 1afc7266fa1b6..22731a666fcc4 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -70,12 +70,13 @@ jobs:
- name: Bash Test
shell: bash
run: |
- export PATH=C:\Strawberry\c\bin\:$PATH
+ export PATH=C:\Strawberry\c\bin\:C:\Android\android-sdk\cmake\3.18.1\bin:$PATH
+ export PATH=/c/Strawberry/c/bin/:$PATH
cmake --version
which cmake
- name: Check long paths
run: |
- #Get-ChildItem -Path "C:\" -Recurse -Include "cmake.exe"
+ Get-ChildItem -Path "C:\Strawberry\" -Recurse -Include "cmake.exe"
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
# It's good practice to use setup-python, but this is also required on macos-14
>From 4d8a35ee63f4754bbaa667126c70abc0e2fb9223 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 17:43:54 -0700
Subject: [PATCH 28/53] Debug
---
.github/workflows/release-binaries.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 22731a666fcc4..33dec7d3ea318 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -74,6 +74,7 @@ jobs:
export PATH=/c/Strawberry/c/bin/:$PATH
cmake --version
which cmake
+ /c/Android/android-sdk/cmake/3.31.5/bin/cmake.exe --version
- name: Check long paths
run: |
Get-ChildItem -Path "C:\Strawberry\" -Recurse -Include "cmake.exe"
@@ -251,11 +252,12 @@ jobs:
shell: bash
env:
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
+ CMAKE: /c/Android/android-sdk/cmake/3.31.5/bin/cmake.exe
run: |
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
export PATH=C:\Strawberry\c\bin\:$PATH
- cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
+ $CMAKE -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
>From 631f52e1971508ff5f47d59f385957fe2b07fc6e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 23:09:08 -0700
Subject: [PATCH 29/53] bash fix
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 33dec7d3ea318..4aaa9376b181b 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -278,6 +278,7 @@ jobs:
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
- name: Build Windows
if: runner.os == 'Windows'
+ shell: bash
run: |
ninja -v -C build stage2-package
>From 20c99f2d2b21cc74c7da6bf3947db47f1aa969ce Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 15 Aug 2025 23:27:16 -0700
Subject: [PATCH 30/53] Fix space n cmake
---
clang/utils/perf-training/llvm-support/build.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/utils/perf-training/llvm-support/build.test b/clang/utils/perf-training/llvm-support/build.test
index 32ce9a870b91d..7b2a788c1362d 100644
--- a/clang/utils/perf-training/llvm-support/build.test
+++ b/clang/utils/perf-training/llvm-support/build.test
@@ -1,2 +1,2 @@
-RUN: %cmake -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
+RUN: %^cmake -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
RUN: %perf_wrapper %cmake --build %t -v --target LLVMSupport
>From 3217df37049a6230710d02e1f9f3df8373422a64 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 16 Aug 2025 09:37:02 -0700
Subject: [PATCH 31/53] Fix
---
clang/utils/perf-training/llvm-support/build.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/utils/perf-training/llvm-support/build.test b/clang/utils/perf-training/llvm-support/build.test
index 7b2a788c1362d..eaf35b992d034 100644
--- a/clang/utils/perf-training/llvm-support/build.test
+++ b/clang/utils/perf-training/llvm-support/build.test
@@ -1,2 +1,2 @@
-RUN: %^cmake -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
+RUN: {%cmake} -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
RUN: %perf_wrapper %cmake --build %t -v --target LLVMSupport
>From 8bfc12e83443973e19576d726108d5e6d0875bef Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 16 Aug 2025 11:37:26 -0700
Subject: [PATCH 32/53] Fix
---
clang/utils/perf-training/lit.site.cfg.in | 2 +-
clang/utils/perf-training/llvm-support/build.test | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/utils/perf-training/lit.site.cfg.in b/clang/utils/perf-training/lit.site.cfg.in
index da81ec21a28a6..9e7611da08e6e 100644
--- a/clang/utils/perf-training/lit.site.cfg.in
+++ b/clang/utils/perf-training/lit.site.cfg.in
@@ -8,7 +8,7 @@ config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
-config.cmake_exe = "@CMAKE_COMMAND@"
+config.cmake_exe = shlex.quote(@CMAKE_COMMAND@")
config.llvm_src_dir ="@CMAKE_SOURCE_DIR@"
config.cmake_generator ="@CMAKE_GENERATOR@"
config.use_llvm_build = @CLANG_PGO_TRAINING_USE_LLVM_BUILD@
diff --git a/clang/utils/perf-training/llvm-support/build.test b/clang/utils/perf-training/llvm-support/build.test
index eaf35b992d034..32ce9a870b91d 100644
--- a/clang/utils/perf-training/llvm-support/build.test
+++ b/clang/utils/perf-training/llvm-support/build.test
@@ -1,2 +1,2 @@
-RUN: {%cmake} -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
+RUN: %cmake -G %cmake_generator -B %t -S %llvm_src_dir %cmake_compiler_args -DCMAKE_BUILD_TYPE=Release
RUN: %perf_wrapper %cmake --build %t -v --target LLVMSupport
>From 582d54a345f02cca50a06207965f0bbbfc480917 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 16 Aug 2025 12:32:31 -0700
Subject: [PATCH 33/53] Fix
---
clang/utils/perf-training/lit.site.cfg.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/utils/perf-training/lit.site.cfg.in b/clang/utils/perf-training/lit.site.cfg.in
index 9e7611da08e6e..ae608b4d9b6ae 100644
--- a/clang/utils/perf-training/lit.site.cfg.in
+++ b/clang/utils/perf-training/lit.site.cfg.in
@@ -8,7 +8,7 @@ config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
-config.cmake_exe = shlex.quote(@CMAKE_COMMAND@")
+config.cmake_exe = shlex.quote("@CMAKE_COMMAND@")
config.llvm_src_dir ="@CMAKE_SOURCE_DIR@"
config.cmake_generator ="@CMAKE_GENERATOR@"
config.use_llvm_build = @CLANG_PGO_TRAINING_USE_LLVM_BUILD@
>From d122ad834d29126bf80f4c381c7069626a6e1717 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 16 Aug 2025 13:22:53 -0700
Subject: [PATCH 34/53] Fix
---
clang/utils/perf-training/lit.site.cfg.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/utils/perf-training/lit.site.cfg.in b/clang/utils/perf-training/lit.site.cfg.in
index ae608b4d9b6ae..71fa957dcdc70 100644
--- a/clang/utils/perf-training/lit.site.cfg.in
+++ b/clang/utils/perf-training/lit.site.cfg.in
@@ -1,6 +1,7 @@
@LIT_SITE_CFG_IN_HEADER@
import sys
+import shlex
config.clang_tools_dir = lit_config.substitute("@CURRENT_TOOLS_DIR@")
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
>From 4b59a929a19bbbe1a792118320999aa9b21fa818 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 16 Aug 2025 14:30:27 -0700
Subject: [PATCH 35/53] Fix
---
.github/workflows/release-binaries.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 4aaa9376b181b..5fe7b81badd6f 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -261,9 +261,9 @@ jobs:
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
- -DCMAKE_OBJECT_PATH_MAX=450 \
- -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=450 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=450 \
+ -DCMAKE_OBJECT_PATH_MAX=128 \
+ -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From 232100f2c55c5eacc7383cf623fb269ed44a50b8 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 07:47:22 -0700
Subject: [PATCH 36/53] Try to use response file
---
.github/workflows/release-binaries.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index f9ff6b20d9f52..18bb1f861387b 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -262,6 +262,18 @@ jobs:
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_OBJECT_PATH_MAX=128 \
+ -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
+ -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
+ -DCMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
+ -DCMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
+ -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
+ -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
+ -DBOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
+ -DBOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
-DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
-DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
>From 1fcfe7fcd875ece95d3ae88c900dbe12d48c9b68 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 08:40:55 -0700
Subject: [PATCH 37/53] Fix path lengths
---
.github/workflows/release-binaries.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 18bb1f861387b..2f106b602511e 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -261,7 +261,7 @@ jobs:
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
- -DCMAKE_OBJECT_PATH_MAX=128 \
+ -DCMAKE_OBJECT_PATH_MAX=500 \
-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
-DCMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
@@ -274,8 +274,8 @@ jobs:
-DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
-DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
-DBOOTSTRAP_BOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
- -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=128 \
+ -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 \
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 \
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From 4bcdf4e4b026753e363d364e3fa69c416af4c10e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 11:57:59 -0700
Subject: [PATCH 38/53] try to fix long paths
---
.github/workflows/release-binaries.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 2f106b602511e..d74e6fcb2a0c2 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -286,6 +286,9 @@ jobs:
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
+ - name: Enable long paths
+ run: reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
+
# There is an issue with building on Windows with bash so we use power shell.
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
- name: Build Windows
>From 8326bcbeb4e5d51e5487e093eb63a314da8da6c7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 11:59:48 -0700
Subject: [PATCH 39/53] Fix typo
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index d74e6fcb2a0c2..d8a187469f32f 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -286,8 +286,8 @@ jobs:
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
- - name: Enable long paths
- run: reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
+ - name: Enable long paths
+ run: reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
# There is an issue with building on Windows with bash so we use power shell.
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
>From dc6ff1112e6199161871a8fe15035130ecb5ecb4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 13:04:57 -0700
Subject: [PATCH 40/53] Use sbust to shorten paths
---
.github/workflows/release-binaries.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index d8a187469f32f..4d7ec388a05a1 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -257,7 +257,9 @@ jobs:
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
export PATH=C:\Strawberry\c\bin\:$PATH
- $CMAKE -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
+ subst S: ${{ github.workspace }}
+ subst B: ${{ steps.setup-stage.outputs.build-prefix }}/build
+ $CMAKE -G Ninja -S S:\llvm -B B:\ \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
@@ -282,7 +284,7 @@ jobs:
shell: bash
if: runner.os != 'Windows'
run: |
- ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
+ ninja -v -C /b stage2-package
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
>From 942be8b71327dc29a57604abe627df4b1a25e65c Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 20:52:37 -0700
Subject: [PATCH 41/53] Fix path shortening
---
.github/workflows/release-binaries.yml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 4d7ec388a05a1..47d9c4203291e 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -247,6 +247,11 @@ jobs:
id: setup-stage
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
+ - name: Shorten paths on windows
+ run:
+ subst S: ${{ github.workspace }}
+ subst B: ${{ steps.setup-stage.outputs.build-prefix }}
+
- name: Configure
id: build
shell: bash
@@ -257,9 +262,7 @@ jobs:
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
export PATH=C:\Strawberry\c\bin\:$PATH
- subst S: ${{ github.workspace }}
- subst B: ${{ steps.setup-stage.outputs.build-prefix }}/build
- $CMAKE -G Ninja -S S:\llvm -B B:\ \
+ $CMAKE -G Ninja -S /s/llvm/ -B /b \
${{ needs.prepare.outputs.target-cmake-flags }} \
-C clang/cmake/caches/Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
>From d58f8313ec847fd1be753e2a984e22ba9a11028e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 20:55:14 -0700
Subject: [PATCH 42/53] Fix typo
---
.github/workflows/release-binaries.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 47d9c4203291e..940320bd5a497 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -248,7 +248,7 @@ jobs:
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
- name: Shorten paths on windows
- run:
+ run: |
subst S: ${{ github.workspace }}
subst B: ${{ steps.setup-stage.outputs.build-prefix }}
>From 534a0b25a7561f2e75394ed7ed52a6bb5c4d2e0b Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:04:25 -0700
Subject: [PATCH 43/53] Fix subst
---
.github/workflows/release-binaries.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 940320bd5a497..7c2986fcc11ba 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -250,7 +250,8 @@ jobs:
- name: Shorten paths on windows
run: |
subst S: ${{ github.workspace }}
- subst B: ${{ steps.setup-stage.outputs.build-prefix }}
+ mkdir "S:\build"
+ subst B: S:\build
- name: Configure
id: build
>From 365cfb53546c0d4cb8beb097c244cba38d275e95 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:16:00 -0700
Subject: [PATCH 44/53] Fix
---
.github/workflows/release-binaries.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 7c2986fcc11ba..25e148a0e5541 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -75,11 +75,11 @@ jobs:
cmake --version
which cmake
/c/Android/android-sdk/cmake/3.31.5/bin/cmake.exe --version
- - name: Check long paths
- run: |
- Get-ChildItem -Path "C:\Strawberry\" -Recurse -Include "cmake.exe"
- Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
- New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
+# - name: Check long paths
+# run: |
+# Get-ChildItem -Path "C:\Strawberry\" -Recurse -Include "cmake.exe"
+# Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
+# New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
# It's good practice to use setup-python, but this is also required on macos-14
# due to https://github.com/actions/runner-images/issues/10385
- uses: actions/setup-python at e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
@@ -301,7 +301,7 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
- ninja -v -C build stage2-package
+ ninja -v -C /b stage2-package
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
>From 92a6a9984196d0371585c1da2b528284eafb359e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:26:01 -0700
Subject: [PATCH 45/53] Fix
---
.github/workflows/release-binaries.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 25e148a0e5541..dbe174595e5cf 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -208,10 +208,10 @@ jobs:
if: github.repository_owner == 'llvm'
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
steps:
- - name: Check long paths
- run: |
- Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
- New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
+# - name: Check long paths
+# run: |
+# Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
+# New-Item -Path "C:\actions-runner\llvm-project\llvm-project\build\tools\clang\stage2-instrumented-bins\tools\clang\stage2-bins\tools\mlir\tools\mlir-linalg-ods-gen\CMakeFiles\mlir-linalg-ods-yaml-gen.dir\C_\actions-runner\llvm-project\llvm-project\llvm\resources\windows_version_resource.rc.res" -ItemType File -Force
- name: Checkout Actions
uses: actions/checkout at 08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
>From e69e66406507ade603e1fc4c5457b17d092facf2 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:31:08 -0700
Subject: [PATCH 46/53] Debugging
---
.github/workflows/release-binaries.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index dbe174595e5cf..21a633beebb7e 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -301,6 +301,7 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
+ tail /b/build.ninja
ninja -v -C /b stage2-package
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
>From 87720e6a0bf05b52d396e773b2e127f6a5565aaa Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:42:46 -0700
Subject: [PATCH 47/53] Use powershell for everything
---
.github/workflows/release-binaries.yml | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 21a633beebb7e..c1f77a7fa5df0 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -247,25 +247,19 @@ jobs:
id: setup-stage
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
- - name: Shorten paths on windows
- run: |
- subst S: ${{ github.workspace }}
- mkdir "S:\build"
- subst B: S:\build
-
- name: Configure
id: build
- shell: bash
env:
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
CMAKE: /c/Android/android-sdk/cmake/3.31.5/bin/cmake.exe
run: |
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
# so we need to set some extra cmake flags to disable this.
- export PATH=C:\Strawberry\c\bin\:$PATH
- $CMAKE -G Ninja -S /s/llvm/ -B /b \
+ #export PATH=C:\Strawberry\c\bin\:$PATH
+ subst S: ${{ github.workspace }}
+ cmake -G Ninja -S S:\ -B S:\build \
${{ needs.prepare.outputs.target-cmake-flags }} \
- -C clang/cmake/caches/Release.cmake \
+ -C clang\cmake\caches\Release.cmake \
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_OBJECT_PATH_MAX=500 \
-DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
@@ -299,10 +293,8 @@ jobs:
# ninja: error: mkdir(tools/clang/tools/extra/clang-tidy/misc/ConfusableTable/CMakeFiles/clang-tidy-confusable-chars-gen.dir/C_/actions-runner/llvm-project/llvm-project/llvm): No such file or directory
- name: Build Windows
if: runner.os == 'Windows'
- shell: bash
run: |
- tail /b/build.ninja
- ninja -v -C /b stage2-package
+ ninja -v -C "S:\build" stage2-package
- uses: actions/upload-artifact at ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
>From 3ba0d0b036a4d9b52787b0774f03904634f3cd6a Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 4 Oct 2025 21:51:35 -0700
Subject: [PATCH 48/53] Use backticks
---
.github/workflows/release-binaries.yml | 38 +++++++++++++-------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index c1f77a7fa5df0..cdc274fe24bb6 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -257,25 +257,25 @@ jobs:
# so we need to set some extra cmake flags to disable this.
#export PATH=C:\Strawberry\c\bin\:$PATH
subst S: ${{ github.workspace }}
- cmake -G Ninja -S S:\ -B S:\build \
- ${{ needs.prepare.outputs.target-cmake-flags }} \
- -C clang\cmake\caches\Release.cmake \
- -DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
- -DCMAKE_OBJECT_PATH_MAX=500 \
- -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
- -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
- -DCMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
- -DCMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
- -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
- -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
- -DBOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
- -DBOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 \
- -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 \
- -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 \
+ cmake -G Ninja -S S:\llvm -B S:\build `
+ ${{ needs.prepare.outputs.target-cmake-flags }} `
+ -C clang\cmake\caches\Release.cmake `
+ -DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 `
+ -DCMAKE_OBJECT_PATH_MAX=500 `
+ -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 `
+ -DCMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 `
+ -DCMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" `
+ -DCMAKE_NINJA_FORCE_RESPONSE_FILE=1 `
+ -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 `
+ -DBOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 `
+ -DBOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" `
+ -DBOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 `
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS=1 `
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES=1 `
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_CXX_RESPONSE_FILE_LINK_FLAG="@" `
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 `
+ -DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 `
+ -DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 `
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
>From 63b767c9373dc9e45615d954dbae81d993bf30dd Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 6 Oct 2025 08:30:57 -0700
Subject: [PATCH 49/53] Debugging fixes
---
.github/workflows/release-binaries.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index cdc274fe24bb6..75064c2c55335 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -175,7 +175,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*|windows-2022)
- build_runs_on="depot-${{ inputs.runs-on }}-16"
+ build_runs_on="depot-${{ inputs.runs-on }}-64"
test_runs_on=$build_runs_on
;;
macos-13)
@@ -319,6 +319,7 @@ jobs:
- name: Check Disk
if: always()
run: |
+ cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
Get-WmiObject -Class Win32_LogicalDisk -ComputerName LOCALHOST | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB}
upload-release-binaries:
>From f0aa10ce0f299f380a72c9aca89ce50a6adc7f41 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 6 Oct 2025 14:30:57 -0700
Subject: [PATCH 50/53] Try to fix installer size on Windows
---
.github/workflows/release-binaries.yml | 2 +-
clang/cmake/caches/Release.cmake | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 75064c2c55335..ab922af47f0cc 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -175,7 +175,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*|windows-2022)
- build_runs_on="depot-${{ inputs.runs-on }}-64"
+ build_runs_on="depot-${{ inputs.runs-on }}-16"
test_runs_on=$build_runs_on
;;
macos-13)
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index d68627aa607ce..e24e5b22e2b83 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -30,7 +30,13 @@ endfunction()
#
# cmake -D LLVM_RELEASE_ENABLE_PGO=ON -C Release.cmake
-set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang")
+if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
+ # Reduce projects built for Windows due to 2GB installer limits.
+ set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
+else()
+ set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang")
+endif()
+
# bolt only supports ELF, so only enable it for Linux.
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
list(APPEND DEFAULT_PROJECTS "bolt")
@@ -143,8 +149,10 @@ endif()
# We want to generate an installer on Windows.
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
set_final_stage_var(CPACK_GENERATOR "TXZ" STRING)
-else()
- set_final_stage_var(CMAKE_OBJECT_PATH_MAX "1024" STRING)
+endif()
+if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
+ # Limit installation size on Windows to avoid 2GB installer limt.
+ set_final_stage_var(LLVM_INSTALL_TOOLCHAIN_ONLY "ON" BOOL)
endif()
set_final_stage_var(CPACK_ARCHIVE_THREADS "0" STRING)
>From 1dad57554c766d97b2442c2f64b9b74b9b69174f Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 6 Oct 2025 19:47:15 -0700
Subject: [PATCH 51/53] Switch to wix and some debugging
---
.github/workflows/release-binaries.yml | 7 ++++++-
clang/cmake/caches/Release.cmake | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index ab922af47f0cc..4996da2236e80 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -175,7 +175,7 @@ jobs:
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*|windows-2022)
- build_runs_on="depot-${{ inputs.runs-on }}-16"
+ build_runs_on="depot-${{ inputs.runs-on }}-64"
test_runs_on=$build_runs_on
;;
macos-13)
@@ -247,6 +247,9 @@ jobs:
id: setup-stage
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
+ - name: Install Wix
+ run: |
+ dotnet tool install --global wix
- name: Configure
id: build
env:
@@ -276,6 +279,8 @@ jobs:
-DBOOTSTRAP_BOOTSTRAP_CMAKE_NINJA_FORCE_RESPONSE_FILE=1 `
-DBOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 `
-DBOOTSTRAP_BOOTSTRAP_CMAKE_OBJECT_PATH_MAX=500 `
+ -DBOOTSTRAP_BOOTSTRAP_LLVM_BUILD_TOOLS=OFF `
+ -DBOOTSTRAP_BOOTSTRAP_CPACK_GENERATOR=WIX `
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
- name: Build Unix
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index e24e5b22e2b83..3603b29cf57a6 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -32,7 +32,8 @@ endfunction()
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
# Reduce projects built for Windows due to 2GB installer limits.
- set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
+ #set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
+ set (DEFAULT_PROJECTS "clang;lld")
else()
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir;flang")
endif()
>From 9790c7b7b94bbfc82cad234e3055ccd75433e29c Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 7 Oct 2025 12:58:36 -0700
Subject: [PATCH 52/53] FIxes and ebugging
---
.github/workflows/release-binaries.yml | 1 +
clang/cmake/caches/Release.cmake | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 4996da2236e80..10264cb7b9225 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -324,6 +324,7 @@ jobs:
- name: Check Disk
if: always()
run: |
+ cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log
cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
Get-WmiObject -Class Win32_LogicalDisk -ComputerName LOCALHOST | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB}
diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake
index 3603b29cf57a6..4ca04a30dabe5 100644
--- a/clang/cmake/caches/Release.cmake
+++ b/clang/cmake/caches/Release.cmake
@@ -47,7 +47,7 @@ set (DEFAULT_RUNTIMES "compiler-rt;libcxx")
if (NOT WIN32)
list(APPEND DEFAULT_RUNTIMES "libcxxabi" "libunwind")
endif()
-set(LLVM_RELEASE_ENABLE_LTO THIN CACHE STRING "")
+set(LLVM_RELEASE_ENABLE_LTO OFF CACHE STRING "")
set(LLVM_RELEASE_ENABLE_PGO ON CACHE BOOL "")
set(LLVM_RELEASE_ENABLE_RUNTIMES ${DEFAULT_RUNTIMES} CACHE STRING "")
set(LLVM_RELEASE_ENABLE_PROJECTS ${DEFAULT_PROJECTS} CACHE STRING "")
>From a369bf8e5b5122e9e252c5ff3377fded925d0044 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 7 Oct 2025 13:49:26 -0700
Subject: [PATCH 53/53] Wix does not like strings on versions
---
cmake/Modules/LLVMVersion.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/Modules/LLVMVersion.cmake b/cmake/Modules/LLVMVersion.cmake
index f59dd7b3722dd..3364aef32b2c8 100644
--- a/cmake/Modules/LLVMVersion.cmake
+++ b/cmake/Modules/LLVMVersion.cmake
@@ -10,6 +10,6 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 0)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)
- set(LLVM_VERSION_SUFFIX git)
+ set(LLVM_VERSION_SUFFIX)
endif()
More information about the llvm-commits
mailing list