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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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 >From 437f42e525a34b83963232580a871b2458e56f3c Mon Sep 17 00:00:00 2001 From: Tom Stellard <tstel...@redhat.com> Date: Mon, 11 Aug 2025 13:48:28 -0700 Subject: [PATCH 17/33] 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@39cd14951b08e74b54015e9e001cdefcf80e669f >From 0f322ee3ba7aa19336cf699d6dcdf1cd1ec6c83f Mon Sep 17 00:00:00 2001 From: Tom Stellard <tstel...@redhat.com> Date: Mon, 11 Aug 2025 13:56:13 -0700 Subject: [PATCH 18/33] 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 <tstel...@redhat.com> Date: Mon, 11 Aug 2025 20:43:33 -0700 Subject: [PATCH 19/33] 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 <tstel...@redhat.com> Date: Tue, 12 Aug 2025 03:39:06 -0700 Subject: [PATCH 20/33] 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 <tstel...@redhat.com> Date: Tue, 12 Aug 2025 13:01:05 -0700 Subject: [PATCH 21/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 14:45:30 -0700 Subject: [PATCH 22/33] 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@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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: >From 4b16d69753f7fc5fec06e8ef1728771c1f8afb83 Mon Sep 17 00:00:00 2001 From: Tom Stellard <tstel...@redhat.com> Date: Fri, 15 Aug 2025 14:50:38 -0700 Subject: [PATCH 23/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 16:32:05 -0700 Subject: [PATCH 24/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 16:38:14 -0700 Subject: [PATCH 25/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 17:27:22 -0700 Subject: [PATCH 26/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 17:32:20 -0700 Subject: [PATCH 27/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 17:43:54 -0700 Subject: [PATCH 28/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 23:09:08 -0700 Subject: [PATCH 29/33] 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 <tstel...@redhat.com> Date: Fri, 15 Aug 2025 23:27:16 -0700 Subject: [PATCH 30/33] 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 <tstel...@redhat.com> Date: Sat, 16 Aug 2025 09:37:02 -0700 Subject: [PATCH 31/33] 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 <tstel...@redhat.com> Date: Sat, 16 Aug 2025 11:37:26 -0700 Subject: [PATCH 32/33] 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 <tstel...@redhat.com> Date: Sat, 16 Aug 2025 12:32:31 -0700 Subject: [PATCH 33/33] 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@ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits