Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2110f92
workflows/release-binaries: Enable Windows x86 builds
tstellar Feb 22, 2025
a0313b1
Fix typo
tstellar Feb 24, 2025
434b4f8
Disable unsupported runtimes
tstellar Feb 24, 2025
1854aed
Windows-2022
tstellar Jul 27, 2025
ecf2b17
Windows fixes
tstellar Jul 27, 2025
03222fc
XXX: Debug
tstellar Jul 27, 2025
bd8b149
Fix
tstellar Jul 27, 2025
59f4186
Update Release.cmake
tstellar Aug 1, 2025
2c0e6ee
Update release-binaries.yml
tstellar Aug 4, 2025
f258bbc
Update release-binaries.yml
tstellar Aug 4, 2025
7f27ea0
Update release-binaries.yml
tstellar Aug 4, 2025
a7a2417
Use powershell for windows
tstellar Aug 4, 2025
82c2fa5
Fix
tstellar Aug 4, 2025
a884e0d
Fix
tstellar Aug 4, 2025
eb74e41
Fix
tstellar Aug 4, 2025
617a2f8
XXX:Debug
tstellar Aug 11, 2025
437f42e
XXX: Debug
tstellar Aug 11, 2025
0f322ee
Fix
tstellar Aug 11, 2025
df7e14c
Fix
tstellar Aug 12, 2025
15b9477
Check diskspace
tstellar Aug 12, 2025
c4aa68d
Debug
tstellar Aug 12, 2025
f97b69b
Debug
tstellar Aug 15, 2025
4b16d69
Fix
tstellar Aug 15, 2025
db48c6a
Debug
tstellar Aug 15, 2025
9fe8287
Debug
tstellar Aug 15, 2025
67c0775
Debug
tstellar Aug 16, 2025
4507672
Debug
tstellar Aug 16, 2025
4d8a35e
Debug
tstellar Aug 16, 2025
631f52e
bash fix
tstellar Aug 16, 2025
20c99f2
Fix space n cmake
tstellar Aug 16, 2025
3217df3
Fix
tstellar Aug 16, 2025
8bfc12e
Fix
tstellar Aug 16, 2025
582d54a
Fix
tstellar Aug 16, 2025
d122ad8
Fix
tstellar Aug 16, 2025
4b59a92
Fix
tstellar Aug 16, 2025
2971c79
Merge branch 'main' into release-windows
tstellar Oct 4, 2025
232100f
Try to use response file
tstellar Oct 4, 2025
1fcfe7f
Fix path lengths
tstellar Oct 4, 2025
4bcdf4e
try to fix long paths
tstellar Oct 4, 2025
8326bcb
Fix typo
tstellar Oct 4, 2025
dc6ff11
Use sbust to shorten paths
tstellar Oct 4, 2025
942be8b
Fix path shortening
tstellar Oct 5, 2025
d58f831
Fix typo
tstellar Oct 5, 2025
534a0b2
Fix subst
tstellar Oct 5, 2025
365cfb5
Fix
tstellar Oct 5, 2025
92a6a99
Fix
tstellar Oct 5, 2025
e69e664
Debugging
tstellar Oct 5, 2025
87720e6
Use powershell for everything
tstellar Oct 5, 2025
3ba0d0b
Use backticks
tstellar Oct 5, 2025
63b767c
Debugging fixes
tstellar Oct 6, 2025
f0aa10c
Try to fix installer size on Windows
tstellar Oct 6, 2025
1dad575
Switch to wix and some debugging
tstellar Oct 7, 2025
9790c7b
FIxes and ebugging
tstellar Oct 7, 2025
a369bf8
Wix does not like strings on versions
tstellar Oct 7, 2025
a4514bf
Remove nsis log
tstellar Oct 7, 2025
f97d2f5
Remove nsis log
tstellar Oct 7, 2025
fce8a8e
Fix suffix
tstellar Oct 7, 2025
6e5dd2c
Drop log
tstellar Oct 7, 2025
81542a8
Mv artifacts
tstellar Oct 7, 2025
36c7b9e
Merge remote-tracking branch 'origin/main' into release-windows
tstellar Oct 8, 2025
7f23a95
Cleanups last commit was working
tstellar Oct 8, 2025
06adc74
More cleanups previous build working
tstellar Oct 8, 2025
f792298
Simplify more previous build works
tstellar Oct 8, 2025
2e20a55
Add missing shell parameter
tstellar Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/release-binaries-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ 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
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release-binaries-setup-stage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
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')
shell: pwsh
run: |
subst S: ${{ github.workspace }}

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in
${ github.workspace }
, which may be controlled by an external user.

- name: Set Build Prefix
id: build-prefix
shell: bash
Expand All @@ -37,7 +45,9 @@
build_prefix=`pwd`
if [ "${{ runner.os }}" = "Linux" ]; then
sudo chown $USER:$USER /mnt/
build_prefix=/mnt/
elif [ "${{ runner.os }}" = "Windows" ]; then

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in
${ runner.os }
, which may be controlled by an external user.
build_prefix=/s/
fi
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT

Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
- ubuntu-22.04-arm
- macos-13
- macos-14
- windows-2022

workflow_call:
inputs:
Expand Down Expand Up @@ -118,9 +119,15 @@ jobs:
echo "ref=$ref" >> $GITHUB_OUTPUT
echo "upload=$upload" >> $GITHUB_OUTPUT

if [ "$RUNNER_OS" = "Windows" ]; then
release_binary_suffix="msi"
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
Expand Down Expand Up @@ -159,8 +166,8 @@ 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*)
build_runs_on="depot-${{ inputs.runs-on }}-16"
ubuntu-22.04*|windows-2022)
build_runs_on="depot-${{ inputs.runs-on }}-64"
test_runs_on=$build_runs_on
;;
macos-13)
Expand Down Expand Up @@ -229,6 +236,12 @@ 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
Expand Down
22 changes: 19 additions & 3 deletions clang/cmake/caches/Release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ 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")
set (DEFAULT_PROJECTS "clang;lld")
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")
Expand All @@ -56,7 +63,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")
Expand Down Expand Up @@ -140,7 +147,16 @@ 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(${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")
# 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)

set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL)
Expand Down
3 changes: 2 additions & 1 deletion clang/utils/perf-training/lit.site.cfg.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
@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@"
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@
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/LLVMVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

2 changes: 2 additions & 0 deletions llvm/utils/lit/lit/TestRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,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
Expand Down Expand Up @@ -1205,6 +1206,7 @@ def executeScriptInternal(
) from None

cmd = cmds[0]
print(cmds)
for c in cmds[1:]:
cmd = ShUtil.Seq(cmd, "&&", c)

Expand Down
Loading