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 <tstel...@redhat.com> Date: Sat, 22 Feb 2025 03:08:24 +0000 Subject: [PATCH 01/16] 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 <tstel...@redhat.com> Date: Mon, 24 Feb 2025 18:17:47 +0000 Subject: [PATCH 02/16] 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 <tstel...@redhat.com> Date: Mon, 24 Feb 2025 18:37:28 +0000 Subject: [PATCH 03/16] 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 <tstel...@redhat.com> Date: Sat, 26 Jul 2025 22:42:08 -0700 Subject: [PATCH 04/16] 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 <tstel...@redhat.com> Date: Sat, 26 Jul 2025 22:42:58 -0700 Subject: [PATCH 05/16] 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 <tstel...@redhat.com> Date: Sat, 26 Jul 2025 22:43:54 -0700 Subject: [PATCH 06/16] 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 <tstel...@redhat.com> Date: Sat, 26 Jul 2025 22:50:16 -0700 Subject: [PATCH 07/16] 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 <tstel...@redhat.com> Date: Fri, 1 Aug 2025 15:38:39 -0700 Subject: [PATCH 08/16] 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 <tstel...@redhat.com> Date: Mon, 4 Aug 2025 10:40:35 -0700 Subject: [PATCH 09/16] 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 <tstel...@redhat.com> Date: Mon, 4 Aug 2025 11:25:25 -0700 Subject: [PATCH 10/16] 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 <tstel...@redhat.com> Date: Mon, 4 Aug 2025 11:29:05 -0700 Subject: [PATCH 11/16] 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: >From a7a241767d7ec6bb60f095de241823d0ba9aa565 Mon Sep 17 00:00:00 2001 From: Tom Stellard <tstel...@redhat.com> Date: Mon, 4 Aug 2025 12:06:11 -0700 Subject: [PATCH 12/16] 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@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 with: >From 82c2fa50260f16cebb766f8a5aec03da4585e294 Mon Sep 17 00:00:00 2001 From: Tom Stellard <tstel...@redhat.com> Date: Mon, 4 Aug 2025 12:09:01 -0700 Subject: [PATCH 13/16] 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 <tstel...@redhat.com> Date: Mon, 4 Aug 2025 14:39:40 -0700 Subject: [PATCH 14/16] 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 <tstel...@redhat.com> Date: Mon, 4 Aug 2025 14:41:17 -0700 Subject: [PATCH 15/16] 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 <tstel...@redhat.com> Date: Mon, 11 Aug 2025 13:45:06 -0700 Subject: [PATCH 16/16] 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@39cd14951b08e74b54015e9e001cdefcf80e669f _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits