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 <[email protected]> Date: Sat, 22 Feb 2025 03:08:24 +0000 Subject: [PATCH 01/66] 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 <[email protected]> Date: Mon, 24 Feb 2025 18:17:47 +0000 Subject: [PATCH 02/66] 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 <[email protected]> Date: Mon, 24 Feb 2025 18:37:28 +0000 Subject: [PATCH 03/66] 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 <[email protected]> Date: Sat, 26 Jul 2025 22:42:08 -0700 Subject: [PATCH 04/66] 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 <[email protected]> Date: Sat, 26 Jul 2025 22:42:58 -0700 Subject: [PATCH 05/66] 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 <[email protected]> Date: Sat, 26 Jul 2025 22:43:54 -0700 Subject: [PATCH 06/66] 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 <[email protected]> Date: Sat, 26 Jul 2025 22:50:16 -0700 Subject: [PATCH 07/66] 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 <[email protected]> Date: Fri, 1 Aug 2025 15:38:39 -0700 Subject: [PATCH 08/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 10:40:35 -0700 Subject: [PATCH 09/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 11:25:25 -0700 Subject: [PATCH 10/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 11:29:05 -0700 Subject: [PATCH 11/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 12:06:11 -0700 Subject: [PATCH 12/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 12:09:01 -0700 Subject: [PATCH 13/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 14:39:40 -0700 Subject: [PATCH 14/66] 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 <[email protected]> Date: Mon, 4 Aug 2025 14:41:17 -0700 Subject: [PATCH 15/66] 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 <[email protected]> Date: Mon, 11 Aug 2025 13:45:06 -0700 Subject: [PATCH 16/66] 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 <[email protected]> Date: Mon, 11 Aug 2025 13:48:28 -0700 Subject: [PATCH 17/66] 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 <[email protected]> Date: Mon, 11 Aug 2025 13:56:13 -0700 Subject: [PATCH 18/66] 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 <[email protected]> Date: Mon, 11 Aug 2025 20:43:33 -0700 Subject: [PATCH 19/66] 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 <[email protected]> Date: Tue, 12 Aug 2025 03:39:06 -0700 Subject: [PATCH 20/66] 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 <[email protected]> Date: Tue, 12 Aug 2025 13:01:05 -0700 Subject: [PATCH 21/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 14:45:30 -0700 Subject: [PATCH 22/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 14:50:38 -0700 Subject: [PATCH 23/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 16:32:05 -0700 Subject: [PATCH 24/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 16:38:14 -0700 Subject: [PATCH 25/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 17:27:22 -0700 Subject: [PATCH 26/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 17:32:20 -0700 Subject: [PATCH 27/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 17:43:54 -0700 Subject: [PATCH 28/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 23:09:08 -0700 Subject: [PATCH 29/66] 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 <[email protected]> Date: Fri, 15 Aug 2025 23:27:16 -0700 Subject: [PATCH 30/66] 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 <[email protected]> Date: Sat, 16 Aug 2025 09:37:02 -0700 Subject: [PATCH 31/66] 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 <[email protected]> Date: Sat, 16 Aug 2025 11:37:26 -0700 Subject: [PATCH 32/66] 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 <[email protected]> Date: Sat, 16 Aug 2025 12:32:31 -0700 Subject: [PATCH 33/66] 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 <[email protected]> Date: Sat, 16 Aug 2025 13:22:53 -0700 Subject: [PATCH 34/66] 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 <[email protected]> Date: Sat, 16 Aug 2025 14:30:27 -0700 Subject: [PATCH 35/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 07:47:22 -0700 Subject: [PATCH 36/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 08:40:55 -0700 Subject: [PATCH 37/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 11:57:59 -0700 Subject: [PATCH 38/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 11:59:48 -0700 Subject: [PATCH 39/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 13:04:57 -0700 Subject: [PATCH 40/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 20:52:37 -0700 Subject: [PATCH 41/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 20:55:14 -0700 Subject: [PATCH 42/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 21:04:25 -0700 Subject: [PATCH 43/66] 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 <[email protected]> Date: Sat, 4 Oct 2025 21:16:00 -0700 Subject: [PATCH 44/66] 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@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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: >From 92a6a9984196d0371585c1da2b528284eafb359e Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Sat, 4 Oct 2025 21:26:01 -0700 Subject: [PATCH 45/66] 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: >From e69e66406507ade603e1fc4c5457b17d092facf2 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Sat, 4 Oct 2025 21:31:08 -0700 Subject: [PATCH 46/66] 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 >From 87720e6a0bf05b52d396e773b2e127f6a5565aaa Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Sat, 4 Oct 2025 21:42:46 -0700 Subject: [PATCH 47/66] 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: >From 3ba0d0b036a4d9b52787b0774f03904634f3cd6a Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Sat, 4 Oct 2025 21:51:35 -0700 Subject: [PATCH 48/66] 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 <[email protected]> Date: Mon, 6 Oct 2025 08:30:57 -0700 Subject: [PATCH 49/66] 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 <[email protected]> Date: Mon, 6 Oct 2025 14:30:57 -0700 Subject: [PATCH 50/66] 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 <[email protected]> Date: Mon, 6 Oct 2025 19:47:15 -0700 Subject: [PATCH 51/66] 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 <[email protected]> Date: Tue, 7 Oct 2025 12:58:36 -0700 Subject: [PATCH 52/66] 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 <[email protected]> Date: Tue, 7 Oct 2025 13:49:26 -0700 Subject: [PATCH 53/66] 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() >From a4514bfaac609933e17924c3e5d59f01f83ccf4c Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 13:50:02 -0700 Subject: [PATCH 54/66] Remove nsis log --- .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 10264cb7b9225..eeb4fb7f6f398 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -325,7 +325,7 @@ jobs: 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 +# 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 f97d2f5b1492436f666e5a42a5ed31e0290bb58d Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 13:52:27 -0700 Subject: [PATCH 55/66] Remove nsis log --- .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 eeb4fb7f6f398..a8a940fd1cdef 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -321,11 +321,11 @@ jobs: with: build-prefix: ${{ steps.setup-stage.outputs.build-prefix }} + # cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log - 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} upload-release-binaries: >From fce8a8eef86239e4b7cff73a98df387f0d9f869c Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 15:07:32 -0700 Subject: [PATCH 56/66] Fix suffix --- .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 a8a940fd1cdef..6d59b621b352c 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -133,7 +133,7 @@ jobs: echo "upload=$upload" >> $GITHUB_OUTPUT if [ "$RUNNER_OS" = "Windows" ]; then - release_binary_suffix="exe" + release_binary_suffix="msi" else release_binary_suffix="tar.xz" fi >From 6e5dd2cba3c25a9b07258b7dad59f86d750ceb38 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 15:07:53 -0700 Subject: [PATCH 57/66] Drop log --- .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 6d59b621b352c..bbea5e3a1650b 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -322,10 +322,10 @@ jobs: build-prefix: ${{ steps.setup-stage.outputs.build-prefix }} # cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log + # cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log - name: Check Disk if: always() run: | - cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log Get-WmiObject -Class Win32_LogicalDisk -ComputerName LOCALHOST | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB} upload-release-binaries: >From 81542a856bc8d83c1018c8fdfa12db40b7312dc5 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 16:15:29 -0700 Subject: [PATCH 58/66] Mv artifacts --- .github/workflows/release-binaries.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index bbea5e3a1650b..f30357de9c991 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -300,6 +300,12 @@ jobs: if: runner.os == 'Windows' run: | ninja -v -C "S:\build" stage2-package + + - name: Move Release Package + shell: bash + run: | + release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'` + mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} . - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: >From 7f23a9527a21ad2cd76fffcf8eb84c5772111c99 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 17:18:07 -0700 Subject: [PATCH 59/66] Cleanups last commit was working --- .github/workflows/release-binaries.yml | 47 ++++---------------------- clang/cmake/caches/Release.cmake | 2 +- 2 files changed, 7 insertions(+), 42 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index f30357de9c991..38b1ed82d1ae7 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -67,19 +67,6 @@ jobs: test-runs-on: ${{ steps.vars.outputs.build-runs-on }} steps: - - name: Bash Test - shell: bash - run: | - 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 - /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 # 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@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 @@ -171,6 +158,11 @@ 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 @@ -208,10 +200,7 @@ 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: Checkout Actions uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: @@ -263,23 +252,6 @@ jobs: 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_LLVM_BUILD_TOOLS=OFF ` -DBOOTSTRAP_BOOTSTRAP_CPACK_GENERATOR=WIX ` -DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}" @@ -327,13 +299,6 @@ jobs: with: build-prefix: ${{ steps.setup-stage.outputs.build-prefix }} - # cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log - # cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log - - name: Check Disk - if: always() - run: | - Get-WmiObject -Class Win32_LogicalDisk -ComputerName LOCALHOST | ? {$_. DriveType -eq 3} | select DeviceID, {$_.Size /1GB}, {$_.FreeSpace /1GB} - upload-release-binaries: name: "Upload Release Binaries" needs: diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake index 4ca04a30dabe5..3603b29cf57a6 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 OFF CACHE STRING "") +set(LLVM_RELEASE_ENABLE_LTO THIN 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 06adc74a46c3625108cdbb387aac96d5c38be0a7 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 19:41:29 -0700 Subject: [PATCH 60/66] More cleanups previous build working --- .github/workflows/release-binaries.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 38b1ed82d1ae7..761c198799024 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -257,28 +257,18 @@ jobs: - name: Build Unix shell: bash - if: runner.os != 'Windows' run: | - ninja -v -C /b stage2-package - release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'` + ninja -v -C /s/build stage2-package + release_dir=`find /s/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 - if: runner.os == 'Windows' - run: | - ninja -v -C "S:\build" stage2-package + #- name: Build Windows + # if: runner.os == 'Windows' + # run: | + # ninja -v -C "S:\build" stage2-package - - name: Move Release Package - shell: bash - run: | - release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'` - mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} . - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ runner.os }}-${{ runner.arch }}-release-binary >From f792298254aa36e4b51f222eb850ee284f510a2c Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 20:31:09 -0700 Subject: [PATCH 61/66] Simplify more previous build works --- .../release-binaries-setup-stage/action.yml | 9 ++++++ .github/workflows/release-binaries.yml | 30 ++++++++----------- clang/cmake/caches/Release.cmake | 4 ++- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-binaries-setup-stage/action.yml b/.github/workflows/release-binaries-setup-stage/action.yml index 475a25fa6b772..37ed1f7709b5d 100644 --- a/.github/workflows/release-binaries-setup-stage/action.yml +++ b/.github/workflows/release-binaries-setup-stage/action.yml @@ -30,6 +30,13 @@ runs: with: arch: amd64 + # In order to avoid some errors with long paths names, we need to shorten + # the path names for the build. + - name: Shorten paths on Windows + if: startsWith(runner.os, 'Windows') + run: | + subst S: ${{ github.workspace }} + - name: Set Build Prefix id: build-prefix shell: bash @@ -38,6 +45,8 @@ runs: if [ "${{ runner.os }}" = "Linux" ]; then sudo chown $USER:$USER /mnt/ build_prefix=/mnt/ + elif [ "${{ runner.os }}" = "Windows" ]; then + build_prefix=/s/ fi echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 761c198799024..983c534c2da93 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -236,39 +236,33 @@ jobs: id: setup-stage uses: ./workflows-main/.github/workflows/release-binaries-setup-stage + # We will use Wix to generate the installer on Windows, because this supports + # installers > 2GB. - name: Install Wix + if: runner.os == 'Windows' run: | dotnet tool install --global wix - 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 - subst S: ${{ github.workspace }} - cmake -G Ninja -S S:\llvm -B S:\build ` - ${{ needs.prepare.outputs.target-cmake-flags }} ` - -C clang\cmake\caches\Release.cmake ` - -DBOOTSTRAP_BOOTSTRAP_CPACK_GENERATOR=WIX ` + 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 \ -DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}" - - name: Build Unix + - name: Build shell: bash run: | - ninja -v -C /s/build stage2-package - release_dir=`find /s/build -iname 'stage2-bins'` + 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 "S:\build" stage2-package - + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ runner.os }}-${{ runner.arch }}-release-binary diff --git a/clang/cmake/caches/Release.cmake b/clang/cmake/caches/Release.cmake index 3603b29cf57a6..9d0da17aa9bab 100644 --- a/clang/cmake/caches/Release.cmake +++ b/clang/cmake/caches/Release.cmake @@ -148,7 +148,9 @@ if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux") set_final_stage_var(CLANG_BOLT "INSTRUMENT" STRING) endif() # We want to generate an installer on Windows. -if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows") +if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows") + set_final_stage_var(CPACK_GENERATOR "WIX" STRING) +else() set_final_stage_var(CPACK_GENERATOR "TXZ" STRING) endif() if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows") >From 93653370ccfa03f829c3c09496fbf50c98291909 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Wed, 8 Oct 2025 03:41:00 +0000 Subject: [PATCH 62/66] workflows/release-binaries: Run tests on the same runner as the build Also, ignore the test results since they almost always fail. This allows us to simplify the build process and skip uploading and downloading the build and source directories which are huge. --- .../release-binaries-save-stage/action.yml | 44 ------------- .../release-binaries-setup-stage/action.yml | 59 ------------------ .github/workflows/release-binaries.yml | 62 +++++++------------ 3 files changed, 22 insertions(+), 143 deletions(-) delete mode 100644 .github/workflows/release-binaries-save-stage/action.yml delete mode 100644 .github/workflows/release-binaries-setup-stage/action.yml diff --git a/.github/workflows/release-binaries-save-stage/action.yml b/.github/workflows/release-binaries-save-stage/action.yml deleted file mode 100644 index 84ccf98c23a82..0000000000000 --- a/.github/workflows/release-binaries-save-stage/action.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Save Stage -description: >- - Upload the source and binary directories from a build stage so that they - can be re-used in the next stage. This action is used to the release - binaries workflow into multiple stages to avoid the 6 hour timeout on - the GitHub hosted runners. -inputs: - build-prefix: - description: "Directory containing the build directory." - required: true - type: 'string' - -permissions: - contents: read - -runs: - using: "composite" - steps: - # We need to create an archive of the build directory, because it has too - # many files to upload. - - name: Package Build and Source Directories - shell: bash - run: | - # Remove .git/config to avoid leaking GITHUB_TOKEN stored there. - # See https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/ - rm -Rf .git/config - # Windows does not support symlinks, so we need to dereference them. - tar --exclude build/ ${{ (runner.os == 'Windows' && '-h') || '' }} -c . | zstd -T0 -c > ../llvm-project.tar.zst - mv ../llvm-project.tar.zst . - tar -C ${{ inputs.build-prefix }} -c build/ | zstd -T0 -c > build.tar.zst - - - name: Upload Stage 1 Source - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: ${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-source - path: llvm-project.tar.zst - retention-days: 2 - - - name: Upload Stage 1 Build Dir - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: ${{ runner.os}}-${{ runner.arch }}-${{ github.job }}-build - path: build.tar.zst - retention-days: 2 diff --git a/.github/workflows/release-binaries-setup-stage/action.yml b/.github/workflows/release-binaries-setup-stage/action.yml deleted file mode 100644 index 475a25fa6b772..0000000000000 --- a/.github/workflows/release-binaries-setup-stage/action.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Setup Stage -description: >- - Setup the next stage of the release binaries workflow. This sets up the - environment correctly for a new stage of the release binaries workflow - and also restores the source and build directory from the previous stage. - -inputs: - previous-artifact: - description: >- - A unique descriptor for the artifact from the previous stage. This will - be used to construct the final artifact pattern, which is: - $RUNNER_OS-$RUNNER_ARCH-$PREVIOUS_ARTIFACT-* - required: false - type: 'string' - -outputs: - build-prefix: - description: "Directory containing the build directory." - value: ${{ steps.build-prefix.outputs.build-prefix }} - -runs: - using: "composite" - steps: - - name: Install Ninja - uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main - - - name: Setup Windows - if: startsWith(runner.os, 'Windows') - uses: llvm/actions/setup-windows@main - with: - arch: amd64 - - - name: Set Build Prefix - id: build-prefix - shell: bash - run: | - build_prefix=`pwd` - if [ "${{ runner.os }}" = "Linux" ]; then - sudo chown $USER:$USER /mnt/ - build_prefix=/mnt/ - fi - echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT - - - name: Download Previous Stage Artifact - if: ${{ inputs.previous-artifact }} - id: download - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - pattern: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.previous-artifact }}-* - merge-multiple: true - - - name: Unpack Artifact - if: ${{ steps.download.outputs.download-path }} - shell: bash - run: | - tar --zstd -xf llvm-project.tar.zst - rm llvm-project.tar.zst - tar --zstd -C ${{ steps.build-prefix.outputs.build-prefix}} -xf build.tar.zst - rm build.tar.zst diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index cba48e4d0c70a..f644c11eaba41 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -225,9 +225,25 @@ jobs: run: | mv ../workflows-main . - - name: Setup Stage + - name: Install Ninja + uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main + + - name: Setup Windows + if: startsWith(runner.os, 'Windows') + uses: llvm/actions/setup-windows@main + with: + arch: amd64 + + - name: Set Build Prefix id: setup-stage - uses: ./workflows-main/.github/workflows/release-binaries-setup-stage + shell: bash + run: | + build_prefix=`pwd` + if [ "${{ runner.os }}" = "Linux" ]; then + sudo chown $USER:$USER /mnt/ + build_prefix=/mnt/ + fi + echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT - name: Configure id: build @@ -258,17 +274,11 @@ jobs: path: | ${{ needs.prepare.outputs.release-binary-filename }} - # Clean up some build files to reduce size of artifact. - - name: Clean Up Build Directory - shell: bash + - name: Run Tests + # These almost always fail so don't let them fail the build and prevent the uploads. + continue-on-error: true run: | - find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete - find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} + - - - name: Save Stage - uses: ./workflows-main/.github/workflows/release-binaries-save-stage - with: - build-prefix: ${{ steps.setup-stage.outputs.build-prefix }} + ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all upload-release-binaries: name: "Upload Release Binaries" @@ -327,31 +337,3 @@ jobs: --release ${{ needs.prepare.outputs.release-version }} \ upload \ --files ${{ needs.prepare.outputs.release-binary-filename }}* - - test-release: - name: "Test Release" - needs: - - prepare - - build-release-package - if: >- - github.repository_owner == 'llvm' - runs-on: ${{ needs.prepare.outputs.test-runs-on }} - steps: - - name: Checkout Actions - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }} - sparse-checkout: | - .github/workflows/ - sparse-checkout-cone-mode: false - path: workflows - - name: Setup Stage - id: setup-stage - uses: ./workflows/.github/workflows/release-binaries-setup-stage - with: - previous-artifact: build-release-package - - - name: Run Tests - shell: bash - run: | - ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all >From 2e20a55f6d594d5fa3ddceefb59021818eaea38b Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Tue, 7 Oct 2025 20:55:04 -0700 Subject: [PATCH 63/66] Add missing shell parameter --- .github/workflows/release-binaries-setup-stage/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-binaries-setup-stage/action.yml b/.github/workflows/release-binaries-setup-stage/action.yml index 37ed1f7709b5d..7ef9354d5706a 100644 --- a/.github/workflows/release-binaries-setup-stage/action.yml +++ b/.github/workflows/release-binaries-setup-stage/action.yml @@ -34,6 +34,7 @@ runs: # the path names for the build. - name: Shorten paths on Windows if: startsWith(runner.os, 'Windows') + shell: pwsh run: | subst S: ${{ github.workspace }} >From c24923ada92b1fc9420100a52542d2075df9b457 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Wed, 8 Oct 2025 03:56:31 +0000 Subject: [PATCH 64/66] Remove some dead cone --- .github/workflows/release-binaries.yml | 31 -------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index f644c11eaba41..22daae586b8f0 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -194,37 +194,6 @@ jobs: runs-on: ${{ needs.prepare.outputs.build-runs-on }} steps: - - name: Checkout Actions - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }} - sparse-checkout: | - .github/workflows/ - sparse-checkout-cone-mode: false - # Check out outside of working directory so the source checkout doesn't - # remove it. - path: workflows - - # actions/checkout does not support paths outside of the GITHUB_WORKSPACE. - # Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten - # by future actions/checkout steps. Therefore, in order to checkout the - # latest actions from main, we need to first checkout out the actions inside of - # GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout - # the code being built and the move the actions from main back into GITHUB_WORKSPACE, - # becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE. - - shell: bash - run: mv workflows ../workflows-main - - - name: Checkout LLVM - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - ref: ${{ needs.prepare.outputs.ref }} - - - name: Copy main workflows - shell: bash - run: | - mv ../workflows-main . - - name: Install Ninja uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main >From 7adc23f3ffbe24f6fec6c017bb2b099205c07ce3 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Wed, 8 Oct 2025 04:00:38 +0000 Subject: [PATCH 65/66] Add back in llvm checkout --- .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 22daae586b8f0..83969b5490685 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -194,6 +194,11 @@ jobs: runs-on: ${{ needs.prepare.outputs.build-runs-on }} steps: + - name: Checkout LLVM + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + ref: ${{ needs.prepare.outputs.ref }} + - name: Install Ninja uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main >From 23b256f190d1b42a59eebb85a90eae1517fbf8a2 Mon Sep 17 00:00:00 2001 From: Tom Stellard <[email protected]> Date: Wed, 8 Oct 2025 09:49:38 -0700 Subject: [PATCH 66/66] Fix shell for tests --- .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 17c795ca45825..814ba6f1a12ec 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -241,6 +241,7 @@ jobs: if: runner.os == 'Windows' run: | dotnet tool install --global wix + - name: Configure id: build shell: bash @@ -273,6 +274,7 @@ jobs: - name: Run Tests # These almost always fail so don't let them fail the build and prevent the uploads. continue-on-error: true + shell: bash run: | ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
