Skip to content

Commit 395df9c

Browse files
committed
Merge branch 'main' into tommurray/expose-mlir-util
2 parents dfa0c33 + 6dcdf27 commit 395df9c

File tree

1,402 files changed

+73162
-51889
lines changed

Some content is hidden

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

1,402 files changed

+73162
-51889
lines changed

.ci/metrics/metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
GITHUB_JOB_TO_TRACK = {
4141
"github_llvm_premerge_checks": {
4242
"Build and Test Linux": "premerge_linux",
43+
"Build and Test Linux AArch64": "premerge_linux_aarch64",
4344
"Build and Test Windows": "premerge_windows",
4445
},
4546
"github_libcxx_premerge_checks": {

.github/new-prs-labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ clang:openmp:
10961096
- llvm/test/Transforms/OpenMP/**
10971097

10981098
clang:temporal-safety:
1099-
- clang/include/clang/Analysis/Analyses/LifetimeSafety*
1100-
- clang/lib/Analysis/LifetimeSafety*
1099+
- clang/include/clang/Analysis/Analyses/LifetimeSafety/**
1100+
- clang/lib/Analysis/LifetimeSafety/**
11011101
- clang/unittests/Analysis/LifetimeSafety*
11021102
- clang/test/Sema/*lifetime-safety*
11031103
- clang/test/Sema/*lifetime-analysis*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Test Container
7373
run: |
7474
# Use --pull=never to ensure we are testing the just built image.
75-
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && black --version | grep black'
75+
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && git-clang-format -h | grep usage && black --version | grep black'
7676
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-lint-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-tidy --version | grep version && clang-tidy-diff.py -h | grep usage'
7777
7878
push-ci-container:

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN apt-get update && \
1010
tar -xvJf llvm.tar.xz -C /llvm-extract \
1111
# Only unpack these tools to save space on Github runner.
1212
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
13-
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format && \
13+
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
14+
LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \
1415
rm llvm.tar.xz
1516

1617

@@ -35,7 +36,9 @@ RUN apt-get update && \
3536
FROM base AS ci-container-code-format
3637
ARG LLVM_VERSION
3738

38-
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format ${LLVM_SYSROOT}/bin/clang-format
39+
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
40+
/llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format \
41+
${LLVM_SYSROOT}/bin/
3942

4043
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
4144

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/ubuntu:24.04 AS base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base AS stage1-toolchain
5-
ENV LLVM_VERSION=21.1.1
5+
ENV LLVM_VERSION=21.1.3
66

77
RUN apt-get update && \
88
apt-get install -y \
@@ -62,7 +62,6 @@ RUN apt-get update && \
6262
# Having a symlink from python to python3 enables code sharing between
6363
# the Linux and Windows pipelines.
6464
python3-pip \
65-
python3-venv \
6665
file \
6766
tzdata \
6867
python-is-python3 && \

.github/workflows/pr-code-format.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
jobs:
1313
code_formatter:
1414
runs-on: ubuntu-24.04
15+
container:
16+
image: 'ghcr.io/llvm/ci-ubuntu-24.04-format'
1517
timeout-minutes: 30
1618
concurrency:
1719
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
@@ -23,6 +25,14 @@ jobs:
2325
with:
2426
fetch-depth: 2
2527

28+
# We need to set the repo checkout as safe, otherwise tj-actions/changed-files
29+
# will fail due to the changed ownership inside the container.
30+
# TODO(boomanaiden154): We should probably fix this by having the default user
31+
# in the container have the same ID as the GHA user on the host.
32+
- name: Set Safe Directory
33+
run: |
34+
chown -R root $(pwd)
35+
2636
- name: Get changed files
2737
id: changed-files
2838
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
@@ -39,24 +49,6 @@ jobs:
3949
echo "Formatting files:"
4050
echo "$CHANGED_FILES"
4151
42-
# The clang format version should always be upgraded to the first version
43-
# of a release cycle (x.1.0) or the last version of a release cycle, or
44-
# if there have been relevant clang-format backports.
45-
- name: Install clang-format
46-
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
47-
with:
48-
clangformat: 21.1.0
49-
50-
- name: Setup Python env
51-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
52-
with:
53-
python-version: '3.13'
54-
cache: 'pip'
55-
cache-dependency-path: 'llvm/utils/git/requirements_formatting.txt'
56-
57-
- name: Install python dependencies
58-
run: pip install -r llvm/utils/git/requirements_formatting.txt
59-
6052
- name: Run code formatter
6153
env:
6254
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}

.github/workflows/release-binaries-save-stage/action.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-binaries-setup-stage/action.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release-binaries.yml

Lines changed: 21 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -194,40 +194,30 @@ jobs:
194194
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
195195
steps:
196196

197-
- name: Checkout Actions
198-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
199-
with:
200-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
201-
sparse-checkout: |
202-
.github/workflows/
203-
sparse-checkout-cone-mode: false
204-
# Check out outside of working directory so the source checkout doesn't
205-
# remove it.
206-
path: workflows
207-
208-
# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
209-
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
210-
# by future actions/checkout steps. Therefore, in order to checkout the
211-
# latest actions from main, we need to first checkout out the actions inside of
212-
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
213-
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
214-
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
215-
- shell: bash
216-
run: mv workflows ../workflows-main
217-
218197
- name: Checkout LLVM
219198
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
220199
with:
221200
ref: ${{ needs.prepare.outputs.ref }}
222201

223-
- name: Copy main workflows
224-
shell: bash
225-
run: |
226-
mv ../workflows-main .
202+
- name: Install Ninja
203+
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main
204+
205+
- name: Setup Windows
206+
if: startsWith(runner.os, 'Windows')
207+
uses: llvm/actions/setup-windows@main
208+
with:
209+
arch: amd64
227210

228-
- name: Setup Stage
211+
- name: Set Build Prefix
229212
id: setup-stage
230-
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
213+
shell: bash
214+
run: |
215+
build_prefix=`pwd`
216+
if [ "${{ runner.os }}" = "Linux" ]; then
217+
sudo chown $USER:$USER /mnt/
218+
build_prefix=/mnt/
219+
fi
220+
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT
231221
232222
- name: Configure
233223
id: build
@@ -258,17 +248,11 @@ jobs:
258248
path: |
259249
${{ needs.prepare.outputs.release-binary-filename }}
260250
261-
# Clean up some build files to reduce size of artifact.
262-
- name: Clean Up Build Directory
263-
shell: bash
251+
- name: Run Tests
252+
# These almost always fail so don't let them fail the build and prevent the uploads.
253+
continue-on-error: true
264254
run: |
265-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
266-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +
267-
268-
- name: Save Stage
269-
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
270-
with:
271-
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
255+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
272256
273257
upload-release-binaries:
274258
name: "Upload Release Binaries"
@@ -327,31 +311,3 @@ jobs:
327311
--release ${{ needs.prepare.outputs.release-version }} \
328312
upload \
329313
--files ${{ needs.prepare.outputs.release-binary-filename }}*
330-
331-
test-release:
332-
name: "Test Release"
333-
needs:
334-
- prepare
335-
- build-release-package
336-
if: >-
337-
github.repository_owner == 'llvm'
338-
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
339-
steps:
340-
- name: Checkout Actions
341-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
342-
with:
343-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
344-
sparse-checkout: |
345-
.github/workflows/
346-
sparse-checkout-cone-mode: false
347-
path: workflows
348-
- name: Setup Stage
349-
id: setup-stage
350-
uses: ./workflows/.github/workflows/release-binaries-setup-stage
351-
with:
352-
previous-artifact: build-release-package
353-
354-
- name: Run Tests
355-
shell: bash
356-
run: |
357-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

bolt/docs/BinaryAnalysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# BOLT-based binary analysis
22

33
As part of post-link-time optimizing, BOLT needs to perform a range of analyses
4-
on binaries such as recontructing control flow graphs, and more.
4+
on binaries such as reconstructing control flow graphs, and more.
55

66
The `llvm-bolt-binary-analysis` tool enables running requested binary analyses
77
on binaries, and generating reports. It does this by building on top of the

0 commit comments

Comments
 (0)