Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 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
9365337
workflows/release-binaries: Run tests on the same runner as the build
tstellar Oct 8, 2025
2e20a55
Add missing shell parameter
tstellar Oct 8, 2025
c24923a
Remove some dead cone
tstellar Oct 8, 2025
7adc23f
Add back in llvm checkout
tstellar Oct 8, 2025
0a43258
Merge remote-tracking branch 'tstellar/release-binaries-cleanup' into…
tstellar Oct 8, 2025
23b256f
Fix shell for tests
tstellar Oct 8, 2025
297e798
Remove some debug statements from lit
tstellar Oct 8, 2025
6d8356f
Merge remote-tracking branch 'origin/main' into release-windows
tstellar Oct 8, 2025
48ef58c
MOre fixes previous is working
tstellar Oct 8, 2025
f6ba821
Enable more projects
tstellar Oct 8, 2025
b91a5ca
Fix cmake command
tstellar Oct 8, 2025
67fec42
Build all projects
tstellar Oct 9, 2025
bf6a623
XXX: Enable lto and use correct runners
tstellar Oct 9, 2025
0adb6e9
Dump logs
tstellar Oct 9, 2025
bf74776
Check diskspace
tstellar Oct 10, 2025
70a3547
Fix typo
tstellar Oct 10, 2025
c484689
Disable LTO
tstellar Oct 10, 2025
922dd5f
Build c dylib on windows
tstellar Oct 10, 2025
de562c7
Merge remote-tracking branch 'origin/main' into release-windows
tstellar Oct 10, 2025
8cafe0e
Cleanups
tstellar Oct 10, 2025
d76400a
Stop using wix
tstellar Oct 13, 2025
21a8536
Debug
tstellar Oct 14, 2025
0b01a1d
Reduce targets to fix build with nsis
tstellar Oct 14, 2025
c91a783
toolchain only
tstellar Oct 14, 2025
8912345
Strip moreout
tstellar Oct 14, 2025
b5656c5
Reduce to test nsis
tstellar Oct 14, 2025
05ad53d
Switch back to exe
tstellar Oct 15, 2025
0ddbafb
Match config
tstellar Oct 15, 2025
e0d52ed
[CMake][Release] Stop linking against stage1 runtimes
tstellar Oct 15, 2025
d0753d8
Change variable name
tstellar Oct 20, 2025
4776b5d
Merge remote-tracking branch 'tstellar/release-use-system-libs' into …
tstellar Oct 20, 2025
1f1969f
Install libxml2
tstellar Oct 21, 2025
98757d6
fix typo
tstellar Oct 21, 2025
058053c
Fix typo
tstellar Oct 21, 2025
6c531ea
Don't use bash for libxml2
tstellar Oct 22, 2025
2a1af2e
Fix line breaks
tstellar Oct 22, 2025
64e4257
Fix line endigns
tstellar Oct 22, 2025
b7c63ba
Fix powershellstuff
tstellar Oct 22, 2025
3aa7ef3
Remove whitespace
tstellar Oct 22, 2025
fb452d5
libxml fix
tstellar Oct 22, 2025
4bf3e5f
Fix xml paths
tstellar Oct 22, 2025
dfc4c8e
fix paths
tstellar Oct 22, 2025
72e1ba9
Add debugging
tstellar Oct 22, 2025
bd15049
Fix
tstellar Oct 22, 2025
dde675f
debug
tstellar Oct 22, 2025
3c07573
Try to fix libxml detection
tstellar Oct 22, 2025
41ae7bd
Fixes
tstellar Oct 22, 2025
8846d8e
Debug
tstellar Oct 22, 2025
bc496e5
Fix upload
tstellar Oct 22, 2025
ca4ee22
xxx; debug
tstellar Oct 23, 2025
ed0011c
More debug
tstellar Oct 23, 2025
16e5181
Static link
tstellar Oct 23, 2025
5c0fe14
Merge remote-tracking branch 'origin/main' into HEAD
tstellar Oct 23, 2025
33d7b98
Debug/fix
tstellar Oct 23, 2025
c47965f
Simplify libxml2
tstellar Oct 23, 2025
c31cb68
disable premerge
tstellar Oct 23, 2025
8cfdf3f
Fix typo
tstellar Oct 23, 2025
a6ada3f
libxml2 with package manager
tstellar Oct 23, 2025
aa2fdab
Fix
tstellar Oct 23, 2025
08a392e
Fix cmake loookpu
tstellar Oct 23, 2025
befc6ab
More debug
tstellar Oct 23, 2025
73923c3
Fixes
tstellar Oct 23, 2025
cffd1b0
libxml changes
tstellar Oct 23, 2025
a4de8b0
Fix typo
tstellar Oct 23, 2025
0ee44f8
XXX:
tstellar Oct 23, 2025
f3752f5
Fix typo
tstellar Oct 23, 2025
f377edc
Fix arguments
tstellar Oct 23, 2025
41ac52e
Add includes
tstellar Oct 23, 2025
8d8a23c
Debug
tstellar Oct 23, 2025
c0b9d3c
Switch to custom built
tstellar Oct 23, 2025
1176c5e
Fixes
tstellar Oct 23, 2025
f01ded5
Attemptto fix
tstellar Oct 23, 2025
c75b056
Attemptto fix
tstellar Oct 23, 2025
1b41fcc
Fix quotes
tstellar Oct 23, 2025
0257123
Remove more quotes
tstellar Oct 23, 2025
e91c536
more fixes
tstellar Oct 23, 2025
9509f46
Fix paths
tstellar Oct 23, 2025
358f52f
Install libxml2
tstellar Oct 24, 2025
749dcce
Debug
tstellar Oct 24, 2025
8e97657
Add debug
tstellar Oct 24, 2025
9731d61
Fix upload
tstellar Oct 24, 2025
a9a4406
Install static library
tstellar Oct 24, 2025
55db6ea
Run on github
tstellar Oct 24, 2025
54c4972
Build relase only
tstellar Oct 24, 2025
788eeb3
Fix static install
tstellar Oct 24, 2025
df56500
Fix library name
tstellar Oct 24, 2025
e0189b0
Xheck library
tstellar Oct 24, 2025
7b182af
Try to build static libs
tstellar Oct 24, 2025
ff90d0f
Remove debug
tstellar Oct 24, 2025
7141bf8
FIx static
tstellar Oct 24, 2025
b118532
Fix typo
tstellar Oct 24, 2025
cd525df
Use self-built libxml2
tstellar Oct 24, 2025
42f6ec0
Fix library name
tstellar Oct 24, 2025
e75b32f
Try setting Definitions
tstellar Oct 24, 2025
e75a828
Remove extra upload
tstellar Oct 24, 2025
cf6a060
Try unsetting Definitions
tstellar Oct 24, 2025
fd54593
Rfactor
tstellar Oct 24, 2025
c44c557
cleanups
tstellar Oct 25, 2025
e978a66
depot
tstellar Oct 25, 2025
5a07ac0
Fix typo
tstellar Oct 25, 2025
40f125c
Debug vcpkg
tstellar Oct 25, 2025
8c7146e
Debug
tstellar Oct 25, 2025
67e979b
Debug
tstellar Oct 25, 2025
d4a5a53
Debug
tstellar Oct 25, 2025
66a76ec
Debug
tstellar Oct 25, 2025
07e342d
Attempt to build with vcpkg
tstellar Oct 25, 2025
89f8788
Fix typo
tstellar Oct 27, 2025
1d84e23
Merge remote-tracking branch 'origin/main' into HEAD
tstellar Oct 27, 2025
b14f22f
Full fix
tstellar Oct 27, 2025
e4a58ee
Try to install static vcpkg
tstellar Oct 28, 2025
7eef93e
Fix typo
tstellar Oct 28, 2025
793c77a
Try to update
tstellar Oct 28, 2025
a5b1cda
Fix typo
tstellar Oct 28, 2025
3fc0637
Try to force static libs
tstellar Oct 28, 2025
537cd64
More debug
tstellar Oct 28, 2025
fc4d54c
More debug
tstellar Oct 28, 2025
147fabc
Last try for static vcpkg
tstellar Oct 28, 2025
bba97cc
Fix typo
tstellar Oct 28, 2025
61f3021
Fixes
tstellar Oct 28, 2025
c768127
Fix library name
tstellar Oct 28, 2025
07b1d13
Fix build
tstellar Oct 28, 2025
b8a3dd6
Attempt again
tstellar Oct 28, 2025
90aed9f
Don"t force libraries
tstellar Oct 28, 2025
af3eb4d
Disable features
tstellar Oct 28, 2025
386a03b
Attempt automatic detection
tstellar Oct 28, 2025
27c4a2a
Debug
tstellar Oct 28, 2025
e6bc867
Fix typo
tstellar Oct 28, 2025
befa424
Debug
tstellar Oct 28, 2025
99e8161
Fix debug
tstellar Oct 28, 2025
d1c75c1
Fix
tstellar Oct 28, 2025
309997b
Debug
tstellar Oct 28, 2025
fd37625
Debug
tstellar Oct 28, 2025
f729f1e
Debug
tstellar Oct 29, 2025
f0cd431
Change prefix path
tstellar Oct 29, 2025
3e21962
XXX: Config mode
tstellar Oct 29, 2025
7ee510e
Remove some debugging output
tstellar Oct 29, 2025
41d13fb
Use LibXml2Dir
tstellar Oct 29, 2025
4474932
Use vpckg
tstellar Oct 29, 2025
9115199
Fixes
tstellar Oct 29, 2025
f34431f
Test without the config option
tstellar Oct 29, 2025
21ccc1b
Fixes
tstellar Oct 29, 2025
ee48d6a
Disable flang
tstellar Oct 29, 2025
57898d9
Drop targets
tstellar Oct 29, 2025
123adea
Switch to WIX
tstellar Oct 29, 2025
c548be8
Add wix log
tstellar Oct 29, 2025
7cc3b84
Fix wix version
tstellar Oct 30, 2025
ac71f1c
Fix
tstellar Oct 30, 2025
6419ed6
Disable pipefail
tstellar Oct 30, 2025
fe8bd49
more debug
tstellar Oct 30, 2025
780038f
Fix suffix
tstellar Oct 30, 2025
cfe718e
Use msi
tstellar Oct 30, 2025
86008ba
disable autocrlf
tstellar Oct 30, 2025
38fd869
Some fixes
tstellar Oct 31, 2025
a92e162
Merge remote-tracking branch 'origin/main' into HEAD
tstellar Oct 31, 2025
cc24764
Setu python
tstellar Oct 31, 2025
490400b
Fix python
tstellar Oct 31, 2025
6269956
Add full commit
tstellar Oct 31, 2025
aa36f60
Use specific python interpreter for pip
tstellar Oct 31, 2025
9cca69e
Fix path
tstellar Oct 31, 2025
a81903a
Disable lldb tests
tstellar Oct 31, 2025
115fc6a
Cleanups
tstellar Nov 1, 2025
0a4d2cc
Fix projects and runtimes
tstellar Nov 1, 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
1 change: 1 addition & 0 deletions .github/workflows/release-binaries-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-14
- windows-2022

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

workflow_call:
inputs:
Expand Down Expand Up @@ -116,9 +117,16 @@ jobs:
echo "ref=$ref" >> $GITHUB_OUTPUT
echo "upload=$upload" >> $GITHUB_OUTPUT

if [ "$RUNNER_OS" = "Windows" ]; then
# Wix uses .msi
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"

Expand All @@ -134,13 +142,33 @@ jobs:
fi

if [ "$RUNNER_OS" = "Windows" ]; then
# The build times out on Windows, so we need to disable LTO.
# LTO causes the WiX generator to crash so we need to disable it:
# light.exe : error LGHT0001 : Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
# Stack Trace:
# at Microsoft.Tools.WindowsInstallerXml.Cab.Interop.NativeMethods.CreateCabFinish(IntPtr contextHandle, IntPtr newCabNamesCallBackAddress)
# at Microsoft.Tools.WindowsInstallerXml.Cab.WixCreateCab.Complete(IntPtr newCabNamesCallBackAddress)
# at Microsoft.Tools.WindowsInstallerXml.CabinetBuilder.CreateCabinet(CabinetWorkItem cabinetWorkItem)
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
# libxml2 config
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DBOOTSTRAP_BOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"

# We are using the Wix generator which doesn't support strings in
# the version, so strip out the git suffix and replace the -rc3 suffix
# with .3.
set +o pipefail
rc_version=`grep -o 'LLVM_VERSION_SUFFIX -rc[0-9]' cmake/Modules/LLVMVersion.cmake | cut -d ' ' -f 2 | sed 's/-rc//g'`
set -o pipefail
if [ -z "$rc_version" ]; then
version_suffix=""
else
version_suffix=".$rc_version"
fi
target_cmake_flags="$target_cmake_flags -DLLVM_VERSION_SUFFIX=$version_suffix"
fi

echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
case "${{ inputs.runs-on }}" in
ubuntu-22.04*)
ubuntu-22.04*|windows-2022)
build_runs_on="depot-${{ inputs.runs-on }}-16"
test_runs_on=$build_runs_on
;;
Expand All @@ -160,12 +188,39 @@ jobs:
echo "build-runs-on=$build_runs_on" >> $GITHUB_OUTPUT
echo "test-runs-on=$test_runs_on" >> $GITHUB_OUTPUT


build-release-package:
name: "Build Release Package"
needs: prepare
if: github.repository_owner == 'llvm'
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
steps:
- name: Windows config
if: runner.os == 'Windows'
run: |
# In order to avoid some errors with long paths names, we need to shorten
# the path names for the build.
subst S: ${{ github.workspace }}

# Disable autocrlf See https://llvm.org/docs/GettingStarted.html#id4
git config --global core.autocrlf false

# Install Wix for creating the installer.
dotnet tool install --global wix

# Install libxml2
# Specify [core] to disable extra features so we don't add extra dll dependencies.
# Even with [core] there is still one dll dependency which is bcrypt.dll.
vcpkg install libxml2[core]:x64-windows-static

# Setup python to ensure consistency in the python version used for
# all steps of this job.
- name: Setup Python
id: setup-python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
pip-install: packaging psutil

- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -189,6 +244,8 @@ jobs:
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

Expand All @@ -205,6 +262,11 @@ jobs:

- name: Build
shell: bash
env:
# Set this variable so that stage2-instrumented and stage2 configuration
# steps can find libxml2. This only is used on Windows and setting
# this variable should have no affect on other OSes.
LIBXML2_ROOT: /c/vcpkg/packages/libxml2_x64-windows-static/
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'`
Expand All @@ -221,9 +283,23 @@ 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
env:
# Some tests seem to timeout on windows, so limit the runtime.
LIT_OPTS: "--timeout=300"
run: |
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

- name: Save logs
if: failure() && runner.os == 'Windows'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-nsis-log
path: |
S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log
S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/CPackConfig.cmake

upload-release-binaries:
name: "Upload Release Binaries"
needs:
Expand Down
32 changes: 29 additions & 3 deletions clang/cmake/caches/Release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,35 @@ endfunction()
#
# cmake -D LLVM_RELEASE_ENABLE_PGO=ON -C Release.cmake

set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir")
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
#set_instrument_and_final_stage_var(LLVM_TARGETS_TO_BUILD "AArch64;ARM;X86;BPF;WebAssembly;RISCV;NVPTX" STRING)
set_instrument_and_final_stage_var(LLVM_TARGETS_TO_BUILD "Native" STRING)
set_instrument_and_final_stage_var(Python3_FIND_REGISTRY "NEVER" STRING)
set_instrument_and_final_stage_var(LLDB_RELOCATABLE_PYTHON "1" STRING)
set_instrument_and_final_stage_var(LLDB_EMBED_PYTHON_HOME "OFF" BOOL)
# Enable libxml2. This is necessary for llvm-mt.
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBXML2 "FORCE_ON" STRING)
set_instrument_and_final_stage_var(LLDB_ENABLE_LIBXML2 "OFF" BOOL)
set_instrument_and_final_stage_var(CLANG_ENABLE_LIBXML2 "OFF" BOOL)
set_instrument_and_final_stage_var(LLVM_ENABLE_RPMALLOC "ON" BOOL)
set_final_stage_var(BUILD_LLVM_C_DYLIB "ON" STRING)
set_final_stage_var(LLVM_INSTALL_TOOLCHAIN_ONLY "ON" BOOL)
# Disable lldb tests on Windows since some aren't working.
set_final_stage_var(LLDB_INCLUDE_TESTS "OFF" BOOL)
else()
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir")
endif()

# bolt only supports ELF, so only enable it for Linux.
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
list(APPEND DEFAULT_PROJECTS "bolt")
endif()

# Don't build flang on Darwin due to:
# https://github.com/llvm/llvm-project/issues/160546
if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
# Skip flang build on Windows because it makes the installer too big.
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
list(APPEND DEFAULT_PROJECTS "flang")
endif()

Expand Down Expand Up @@ -164,10 +184,16 @@ endif()
# Final Stage Config (stage2)
set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)
set_final_stage_var(LLVM_ENABLE_PROJECTS "${LLVM_RELEASE_ENABLE_PROJECTS}" STRING)

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)
else()
set_final_stage_var(CPACK_GENERATOR "WIX" STRING)
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
Loading