[llvm] build_llvm_release.bat: Add --fast-build option (PR #219595)
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 15:57:07 PDT 2026
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/219595
This disables PGO and skips the tests for stage0. With this option we can build the Windows release package on the github hosted Arm runners without hitting the 6 hour timeout.
>From f44e2d69fbb3d507a90ac17e297f6169eed27afc Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 28 Aug 2026 15:54:36 -0700
Subject: [PATCH] build_llvm_release.bat: Add --fast-build option
This disables PGO and skips the tests for stage0. With this option
we can build the Windows release package on the github hosted
Arm runners without hitting the 6 hour timeout.
---
.github/workflows/release-binaries.yml | 3 ++-
llvm/utils/release/build_llvm_release.bat | 10 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index e758a0821c3ba..e95a6c5936137 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -297,10 +297,11 @@ jobs:
env:
INPUTS_RUNS_ON: ${{ inputs.runs-on }}
LLVM_VERSION: ${{ needs.prepare.outputs.release-version }}
+ EXTRA_ARGS: ${{ case(needs.prepare.outputs.build-runs-on == 'windows-11-arm', '--fast-build', '--fast-build') }}
run: |
subst S: ${{ github.workspace }}
cd S:\llvm\utils\release\
- .\build_llvm_release.bat "--$($env:RUNNER_ARCH.ToLower())" --version $env:LLVM_VERSION --local-python --skip-checkout
+ .\build_llvm_release.bat "--$($env:RUNNER_ARCH.ToLower())" --version $env:LLVM_VERSION --local-python --skip-checkout $env:EXTRA_ARGS
if ($env:INPUTS_RUNS_ON -eq "windows-11-arm") {
$zstd = (Get-ChildItem -Recurse -Filter "zstd.exe" | Select-Object -First 1).fullName
mv $zstd $env:GITHUB_WORKSPACE
diff --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index db74c8bb0456d..b8a32ccde1050 100644
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -10,7 +10,7 @@ goto begin
echo Script for building the LLVM installer on Windows,
echo used for the releases at https://github.com/llvm/llvm-project/releases
echo.
-echo Usage: build_llvm_release.bat --version ^<version^> [--x86,--x64, --arm64] [--skip-checkout] [--local-python] [--force-msvc]
+echo Usage: build_llvm_release.bat --version ^<version^> [--x86,--x64, --arm64] [--skip-checkout] [--local-python] [--force-msvc] [--fast-build]
echo.
echo Options:
echo --version: [required] version to build
@@ -40,6 +40,7 @@ set arm64=
set skip-checkout=
set local-python=
set force-msvc=
+set fast-build=
call :parse_args %*
if "%help%" NEQ "" goto usage
@@ -325,6 +326,8 @@ if "%arch%"=="arm64" (
cmake -GNinja %cmake_flags% ^
-DLLVM_TARGETS_TO_BUILD=Native ^
%llvm_src%\llvm || exit /b 1
+ninja clang lld llvm-lib llvm-windres runtimes || exit /b 1
+if "%fast-build%" neq "true" (
ninja || exit /b 1
ninja check-llvm || exit /b 1
ninja check-clang || exit /b 1
@@ -332,6 +335,7 @@ ninja check-lld || exit /b 1
if "%arch%"=="amd64" (
ninja check-runtimes || exit /b 1
)
+)
cd..
REM CMake expects the paths that specifies the compiler and linker to be
@@ -351,7 +355,9 @@ set cmake_flags=%all_cmake_flags:\=/%
mkdir build_%arch%
cd build_%arch%
-call :do_generate_profile || exit /b 1
+if "%fast-build%" neq "true" (
+ call :do_generate_profile || exit /b 1
+)
cmake -GNinja %cmake_flags% ^
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;flang;mlir" ^
-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp" ^
More information about the llvm-commits
mailing list