Skip to content

Commit 1e84b67

Browse files
authored
Merge branch 'main' into fmv-always-emit-mangled-default
2 parents 7fee7ce + 4b56345 commit 1e84b67

File tree

4,141 files changed

+86642
-50777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,141 files changed

+86642
-50777
lines changed

.ci/metrics/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"https://influx-prod-13-prod-us-east-0.grafana.net/api/v1/push/influx/write"
1313
)
1414
GITHUB_PROJECT = "llvm/llvm-project"
15-
WORKFLOWS_TO_TRACK = ["Check code formatting"]
15+
WORKFLOWS_TO_TRACK = ["Check code formatting", "LLVM Premerge Checks"]
1616
SCRAPE_INTERVAL_SECONDS = 5 * 60
1717

1818

.ci/monolithic-linux.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ function at-exit {
3434

3535
# If building fails there will be no results files.
3636
shopt -s nullglob
37-
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":linux: Linux x64 Test Results" \
38-
"linux-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
37+
if command -v buildkite-agent 2>&1 >/dev/null
38+
then
39+
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":linux: Linux x64 Test Results" \
40+
"linux-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
41+
fi
3942
}
4043
trap at-exit EXIT
4144

.ci/monolithic-windows.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ function at-exit {
3333

3434
# If building fails there will be no results files.
3535
shopt -s nullglob
36-
python "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":windows: Windows x64 Test Results" \
37-
"windows-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
36+
if command -v buildkite-agent 2>&1 >/dev/null
37+
then
38+
python "${MONOREPO_ROOT}"/.ci/generate_test_report.py ":windows: Windows x64 Test Results" \
39+
"windows-x64-test-results" "${BUILD_DIR}"/test-results.*.xml
40+
fi
3841
}
3942
trap at-exit EXIT
4043

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,9 @@ b6262880b34629e9d7a72b5a42f315a3c9ed8139
9494
39c7dc7207e76e72da21cf4fedda21b5311bf62d
9595
e80bc777749331e9519575f416c342f7626dd14d
9696
7e5cd8f1b6c5263ed5e2cc03d60c8779a8d3e9f7
97+
98+
# NFC: clang-format test_demangle.pass.cpp but keep test "lines"
99+
d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6
100+
101+
# [lldb][NFC] clang-format MainLoopPosix.cpp
102+
66bdbfbaa08fa3d8e64a7fe136a8fb717f5cdbb7

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
/mlir/**/Transforms/SROA.* @moxinilian
130130

131131
# BOLT
132-
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci
132+
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci @yota9
133133

134134
# Bazel build system.
135135
/utils/bazel/ @rupprecht @keith

.github/new-prs-labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,12 @@ backend:RISC-V:
747747
- llvm/**/*riscv*
748748
- llvm/**/*RISCV*
749749

750+
backend:Xtensa:
751+
- clang/**/*xtensa*
752+
- clang/**/*Xtensa*
753+
- llvm/**/*xtensa*
754+
- llvm/**/*Xtensa*
755+
750756
lld:coff:
751757
- lld/**/COFF/**
752758
- lld/Common/**
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build Windows CI Container
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/build-ci-container-windows.yml
12+
- '.github/workflows/containers/github-action-ci-windows/**'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- .github/workflows/build-ci-container-windows.yml
18+
- '.github/workflows/containers/github-action-ci-windows/**'
19+
20+
jobs:
21+
build-ci-container-windows:
22+
if: github.repository_owner == 'llvm'
23+
runs-on: windows-2019
24+
outputs:
25+
container-name: ${{ steps.vars.outputs.container-name }}
26+
container-name-tag: ${{ steps.vars.outputs.container-name-tag }}
27+
container-filename: ${{ steps.vars.outputs.container-filename }}
28+
steps:
29+
- name: Checkout LLVM
30+
uses: actions/checkout@v4
31+
with:
32+
sparse-checkout: .github/workflows/containers/github-action-ci-windows
33+
- name: Write Variables
34+
id: vars
35+
run: |
36+
$tag = [int64](Get-Date -UFormat %s)
37+
$container_name="ghcr.io/$env:GITHUB_REPOSITORY_OWNER/ci-windows-2019"
38+
echo "container-name=${container_name}" >> $env:GITHUB_OUTPUT
39+
echo "container-name-tag=${container_name}:${tag}" >> $env:GITHUB_OUTPUT
40+
echo "container-filename=ci-windows-${tag}.tar" >> $env:GITHUB_OUTPUT
41+
- name: Build Container
42+
working-directory: .github/workflows/containers/github-action-ci-windows
43+
run: |
44+
docker build -t ${{ steps.vars.outputs.container-name-tag }} .
45+
- name: Save container image
46+
run: |
47+
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
48+
- name: Upload container image
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: container
52+
path: ${{ steps.vars.outputs.container-filename }}
53+
retention-days: 14
54+
55+
push-ci-container:
56+
if: github.event_name == 'push'
57+
needs:
58+
- build-ci-container-windows
59+
permissions:
60+
packages: write
61+
runs-on: windows-2019
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
steps:
65+
- name: Download container
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: container
69+
- name: Push Container
70+
run: |
71+
docker load -i ${{ needs.build-ci-container-windows.outputs.container-filename }}
72+
docker tag ${{ needs.build-ci-container-windows.outputs.container-name-tag }} ${{ needs.build-ci-container-windows.outputs.container-name }}:latest
73+
docker login -u ${{ github.actor }} -p $env:GITHUB_TOKEN ghcr.io
74+
docker push ${{ needs.build-ci-container-windows.outputs.container-name-tag }}
75+
docker push ${{ needs.build-ci-container-windows.outputs.container-name }}:latest

.github/workflows/build-ci-container.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Test Container
6161
run: |
6262
for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
63-
podman run --rm -it $image /usr/bin/bash -x -c 'printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
63+
podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
6464
done
6565
6666
push-ci-container:
@@ -80,8 +80,8 @@ jobs:
8080

8181
- name: Push Container
8282
run: |
83-
podman load -i ${{ needs.build-ci-container.outptus.container-filename }}
84-
podman tag ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}:latest
83+
podman load -i ${{ needs.build-ci-container.outputs.container-filename }}
84+
podman tag ${{ needs.build-ci-container.outputs.container-name-tag }} ${{ needs.build-ci-container.outputs.container-name }}:latest
8585
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
8686
podman push ${{ needs.build-ci-container.outputs.container-name-tag }}
8787
podman push ${{ needs.build-ci-container.outputs.container-name }}:latest
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Agent image for LLVM org cluster.
2+
# .net 4.8 is required by chocolately package manager.
3+
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
4+
5+
# Restore the default Windows shell for correct batch processing.
6+
SHELL ["cmd", "/S", "/C"]
7+
8+
# Download the Build Tools bootstrapper.
9+
ADD https://aka.ms/vs/16/release/vs_buildtools.exe /TEMP/vs_buildtools.exe
10+
11+
RUN powershell -Command Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
12+
13+
# Download channel for fixed install.
14+
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
15+
ADD ${CHANNEL_URL} /TEMP/VisualStudio.chman
16+
17+
# Install Build Tools with C++ workload.
18+
# - Documentation for docker installation
19+
# https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019
20+
# - Documentation on workloads
21+
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019#c-build-tools
22+
# - Documentation on flags
23+
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019
24+
RUN /TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \
25+
--channelUri C:\TEMP\VisualStudio.chman \
26+
--installChannelUri C:\TEMP\VisualStudio.chman \
27+
--installPath C:\BuildTools \
28+
--add Microsoft.VisualStudio.Workload.VCTools \
29+
--add Microsoft.VisualStudio.Component.VC.ATL \
30+
--includeRecommended \
31+
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
32+
33+
# Register DIA dll (Debug Interface Access) so it can be used to symbolize
34+
# the stack traces. Register dll for 32 and 64 bit.
35+
# see https://developercommunity.visualstudio.com/content/problem/290674/msdia140dll-is-not-registered-on-vs2017-hosts.html
36+
37+
RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
38+
regsvr32 /S "C:\BuildTools\DIA SDK\bin\msdia140.dll"
39+
40+
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
41+
# and a few more that were not documented...
42+
RUN choco install -y ninja git
43+
# Pin an older version of Python; the current Python 3.10 fails when
44+
# doing "pip install" for the other dependencies, as it fails to find libxml
45+
# while compiling some package.
46+
RUN choco install -y python3 --version 3.9.7
47+
48+
# ActivePerl is currently not installable via Chocolatey, see
49+
# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
50+
# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
51+
# toolchain, and a copy of pkg-config which can cause misdetections for other
52+
# built products, see
53+
# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
54+
# details. Remove the redundant and unnecessary parts of the StrawberryPerl
55+
# install.
56+
RUN choco install -y strawberryperl && \
57+
rmdir /q /s c:\strawberry\c && \
58+
del /q c:\strawberry\perl\bin\pkg-config*
59+
60+
# libcxx requires clang(-cl) to be available
61+
RUN choco install -y sccache llvm
62+
RUN pip install psutil
63+
64+
RUN curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-x86_64.zip && \
65+
powershell Expand-Archive llvm-mingw-*-ucrt-x86_64.zip -DestinationPath . && \
66+
del llvm-mingw-*-ucrt-x86_64.zip && \
67+
ren llvm-mingw-20230320-ucrt-x86_64 llvm-mingw
68+
69+
# configure Python encoding
70+
ENV PYTHONIOENCODING=UTF-8
71+
72+
# update the path variable
73+
# C:\Program Files\Git\usr\bin contains a usable bash and other unix tools.
74+
# C:\llvm-mingw\bin contains Clang configured for mingw targets and
75+
# corresponding sysroots. Both the 'llvm' package (with Clang defaulting
76+
# to MSVC targets) and this directory contains executables named
77+
# 'clang.exe' - add this last to let the other one have precedence.
78+
# To use these compilers, use the triple prefixed form, e.g.
79+
# x86_64-w64-mingw32-clang.
80+
# C:\buildtools and SDK paths are ones that are set by c:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 -host_arch=amd64
81+
RUN powershell -Command \
82+
[System.Environment]::SetEnvironmentVariable('PATH', \
83+
[System.Environment]::GetEnvironmentVariable('PATH', 'machine') + ';C:\Program Files\Git\usr\bin;C:\llvm-mingw\bin' \
84+
+ ';C:\BuildTools\Common7\IDE\' \
85+
+ ';C:\BuildTools\Common7\IDE\CommonExt ensions\Microsoft\TeamFoundation\Team Explorer' \
86+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' \
87+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja' \
88+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer' \
89+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow' \
90+
+ ';C:\BuildTools\Common7\IDE\VC\VCPackages' \
91+
+ ';C:\BuildTools\Common7\Tools\' \
92+
+ ';C:\BuildTools\Common7\Tools\devinit' \
93+
+ ';C:\BuildTools\MSBuild\Current\Bin' \
94+
+ ';C:\BuildTools\MSBuild\Current\bin\Roslyn' \
95+
+ ';C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64' \
96+
+ ';C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\' \
97+
+ ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64' \
98+
+ ';C:\Program Files (x86)\Windows Kits\10\bin\x64' \
99+
+ ';C:\Windows\Microsoft.NET\Framework64\v4.0.30319' \
100+
,'machine')
101+
102+
# support long file names during git checkout
103+
RUN git config --system core.longpaths true & \
104+
git config --global core.autocrlf false
105+
106+
# handle for debugging of files beeing locked by some processes.
107+
RUN choco install -y handle
108+
109+
RUN pip3 install pywin32 buildbot-worker==2.8.4
110+
111+
ARG RUNNER_VERSION=2.319.1
112+
ENV RUNNER_VERSION=$RUNNER_VERSION
113+
114+
RUN powershell -Command \
115+
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v${env:RUNNER_VERSION}/actions-runner-win-x64-${env:RUNNER_VERSION}.zip -OutFile actions-runner-win.zip ; \
116+
Add-Type -AssemblyName System.IO.Compression.FileSystem ; \
117+
[System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner-win.zip', $PWD) ;\
118+
rm actions-runner-win.zip

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/ubuntu:22.04 as base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base as stage1-toolchain
5-
ENV LLVM_VERSION=19.1.2
5+
ENV LLVM_VERSION=19.1.5
66

77
RUN apt-get update && \
88
apt-get install -y \
@@ -41,13 +41,13 @@ RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C .
4141
FROM base
4242

4343
COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT
44-
44+
4545
# Need to install curl for hendrikmuhs/ccache-action
4646
# Need nodejs for some of the GitHub actions.
4747
# Need perl-modules for clang analyzer tests.
4848
# Need git for SPIRV-Tools tests.
4949
RUN apt-get update && \
50-
apt-get install -y \
50+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
5151
binutils \
5252
cmake \
5353
curl \
@@ -56,7 +56,22 @@ RUN apt-get update && \
5656
ninja-build \
5757
nodejs \
5858
perl-modules \
59-
python3-psutil
59+
python3-psutil \
60+
61+
# These are needed by the premerge pipeline. Pip is used to install
62+
# dependent python packages and ccache is used for build caching. File and
63+
# tzdata are used for tests.
64+
python3-pip \
65+
ccache \
66+
file \
67+
tzdata
6068

6169
ENV LLVM_SYSROOT=$LLVM_SYSROOT
6270
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
71+
72+
# Create a new user to avoid test failures related to a lack of expected
73+
# permissions issues in some tests. Set the user id to 1001 as that is the
74+
# user id that Github Actions uses to perform the checkout action.
75+
RUN useradd gha -u 1001 -m -s /bin/bash
76+
USER gha
77+

0 commit comments

Comments
 (0)