Skip to content

Commit f57344b

Browse files
authored
Merge branch 'llvm:main' into clang-tools-headers
2 parents 2935ba5 + de24b0e commit f57344b

File tree

6,824 files changed

+342603
-127712
lines changed

Some content is hidden

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

6,824 files changed

+342603
-127712
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ set -eu
2121
set -o pipefail
2222

2323
# Environment variables script works with:
24+
25+
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
26+
git fetch origin main:main
2427
# List of files affected by this commit
25-
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}
28+
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
2629
# Filter rules for generic windows tests
2730
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
2831
# Filter rules for generic linux tests

.github/new-prs-labeler.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,3 +794,35 @@ llvm:binary-utilities:
794794
- llvm/tools/llvm-size/**
795795
- llvm/tools/llvm-strings/**
796796
- llvm/tools/llvm-symbolizer/**
797+
798+
clang:openmp:
799+
- clang/include/clang/Basic/OpenMP*
800+
- clang/include/clang/AST/OpenMPClause.h
801+
- clang/include/clang/AST/DeclOpenMP.h
802+
- clang/include/clang/AST/ExprOpenMP.h
803+
- clang/include/clang/AST/StmtOpenMP.h
804+
- clang/lib/AST/DeclOpenMP.cpp
805+
- clang/lib/AST/OpenMPClause.cpp
806+
- clang/lib/AST/StmtOpenMP.cpp
807+
- clang/lib/Headers/openmp_wrappers/**
808+
- clang/lib/Parse/ParseOpenMP.cpp
809+
- clang/lib/Basic/OpenMPKinds.cpp
810+
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
811+
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
812+
- clang/lib/CodeGen/CgStmtOpenMP.cpp
813+
- clang/lib/CodeGen/CGOpenMP*
814+
- clang/lib/Sema/SemaOpenMP.cpp
815+
- clang/test/OpenMP/**
816+
- clang/test/AST/ast-dump-openmp-*
817+
- llvm/lib/Frontend/OpenMP/**
818+
- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
819+
- llvm/include/llvm/Frontend/OpenMP/**
820+
- llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
821+
- llvm/unittests/Frontend/OpenMP*
822+
- llvm/test/Transforms/OpenMP/**
823+
824+
openmp:libomp:
825+
- any: ['openmp/**', '!openmp/libomptarget/**']
826+
827+
openmp:libomptarget:
828+
- any: ['openmp/**', '!openmp/runtime/**']

.github/workflows/docs.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# LLVM Documentation CI
2+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3+
# See https://llvm.org/LICENSE.txt for license information.
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
name: "Test documentation build"
7+
8+
permissions:
9+
contents: read
10+
11+
on:
12+
push:
13+
branches:
14+
- 'main'
15+
paths:
16+
- 'llvm/docs/**'
17+
- 'clang/docs/**'
18+
- 'clang-tools-extra/docs/**'
19+
- 'lldb/docs/**'
20+
- 'libunwind/docs/**'
21+
- 'libcxx/docs/**'
22+
- 'libc/docs/**'
23+
- 'lld/docs/**'
24+
- 'openmp/docs/**'
25+
- 'polly/docs/**'
26+
pull_request:
27+
paths:
28+
- 'llvm/docs/**'
29+
- 'clang/docs/**'
30+
- 'clang-tools-extra/docs/**'
31+
- 'lldb/docs/**'
32+
- 'libunwind/docs/**'
33+
- 'libcxx/docs/**'
34+
- 'libc/docs/**'
35+
- 'lld/docs/**'
36+
- 'openmp/docs/**'
37+
- 'polly/docs/**'
38+
39+
jobs:
40+
check-docs-build:
41+
name: "Test documentation build"
42+
runs-on: ubuntu-latest
43+
steps:
44+
# Don't fetch before checking for file changes to force the file changes
45+
# action to use the Github API in pull requests. If it's a push to a
46+
# branch we can't use the Github API to get the diff, so we need to have
47+
# a local checkout beforehand.
48+
- name: Fetch LLVM sources (Push)
49+
if: ${{ github.event_name == 'push' }}
50+
uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 1
53+
- name: Get subprojects that have doc changes
54+
id: docs-changed-subprojects
55+
uses: tj-actions/changed-files@v39
56+
with:
57+
files_yaml: |
58+
llvm:
59+
- 'llvm/docs/**'
60+
clang:
61+
- 'clang/docs/**'
62+
clang-tools-extra:
63+
- 'clang-tools-extra/docs/**'
64+
lldb:
65+
- 'lldb/docs/**'
66+
libunwind:
67+
- 'libunwind/docs/**'
68+
libcxx:
69+
- 'libcxx/docs/**'
70+
libc:
71+
- 'libc/docs/**'
72+
lld:
73+
- 'lld/docs/**'
74+
openmp:
75+
- 'openmp/docs/**'
76+
polly:
77+
- 'polly/docs/**'
78+
- name: Fetch LLVM sources (PR)
79+
if: ${{ github.event_name == 'pull_request' }}
80+
uses: actions/checkout@v4
81+
with:
82+
fetch-depth: 1
83+
- name: Setup Python env
84+
uses: actions/setup-python@v4
85+
with:
86+
python-version: '3.11'
87+
cache: 'pip'
88+
cache-dependency-path: 'llvm/docs/requirements.txt'
89+
- name: Install python dependencies
90+
run: pip install -r llvm/docs/requirements.txt
91+
- name: Install system dependencies
92+
run: |
93+
sudo apt-get update
94+
# swig and graphviz are lldb specific dependencies
95+
sudo apt-get install -y cmake ninja-build swig graphviz
96+
- name: Build LLVM docs
97+
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
98+
run: |
99+
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm
100+
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
101+
- name: Build Clang docs
102+
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
103+
run: |
104+
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm
105+
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
106+
- name: Build clang-tools-extra docs
107+
if: steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true'
108+
run: |
109+
cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm
110+
TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man
111+
- name: Build LLDB docs
112+
if: steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true'
113+
run: |
114+
cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm
115+
TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man
116+
- name: Build libunwind docs
117+
if: steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true'
118+
run: |
119+
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
120+
TZ=UTC ninja -C libunwind-build docs-libunwind-html
121+
- name: Build libcxx docs
122+
if: steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true'
123+
run: |
124+
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx" -DLLVM_ENABLE_SPHINX=ON ./runtimes
125+
TZ=UTC ninja -C libcxx-build docs-libcxx-html
126+
- name: Build libc docs
127+
if: steps.docs-changed-subprojects.outputs.libc_any_changed == 'true'
128+
run: |
129+
cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes
130+
TZ=UTC ninja -C libc-build docs-libc-html
131+
- name: Build LLD docs
132+
if: steps.docs-changed-subprojects.outputs.lld_any_changed == 'true'
133+
run: |
134+
cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
135+
TZ=UTC ninja -C lld-build docs-lld-html
136+
- name: Build OpenMP docs
137+
if: steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true'
138+
run: |
139+
cmake -B openmp-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_ENABLE_SPHINX=ON ./llvm
140+
TZ=UTC ninja -C openmp-build docs-openmp-html
141+
- name: Build Polly docs
142+
if: steps.docs-changed-subprojects.outputs.polly_any_changed == 'true'
143+
run: |
144+
cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm
145+
TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
146+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Check libc++ generated files"
2+
on:
3+
pull_request:
4+
paths:
5+
- 'libcxx/**'
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
check_generated_files:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Fetch LLVM sources
15+
uses: actions/checkout@v4
16+
17+
- name: Install dependencies
18+
uses: aminya/setup-cpp@v1
19+
with:
20+
clangformat: 17.0.1
21+
ninja: true
22+
23+
- name: Check generated files
24+
run: libcxx/utils/ci/run-buildbot check-generated-output

.github/workflows/new-prs.yml

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,36 @@
11
name: "Labelling new pull requests"
2+
3+
permissions:
4+
contents: read
5+
26
on:
3-
workflow_run:
4-
workflows: ["PR Receive"]
7+
# It's safe to use pull_request_target here, because we aren't checking out
8+
# code from the pull request branch.
9+
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
10+
pull_request_target:
11+
types:
12+
- opened
13+
- reopened
14+
- ready_for_review
15+
- synchronize
516

617
jobs:
718
automate-prs-labels:
819
permissions:
9-
contents: read
1020
pull-requests: write
1121
runs-on: ubuntu-latest
22+
# Ignore PRs with more than 10 commits. Pull requests with a lot of
23+
# commits tend to be accidents usually when someone made a mistake while trying
24+
# to rebase. We want to ignore these pull requests to avoid excessive
25+
# notifications.
1226
if: >
1327
github.repository == 'llvm/llvm-project' &&
14-
github.event.workflow_run.event == 'pull_request_target' &&
15-
github.event.workflow_run.conclusion == 'success'
28+
github.event.pull_request.draft == false &&
29+
github.event.pull_request.commits < 10
1630
steps:
17-
# From: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
18-
# Updated version here: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
19-
- name: Debug
20-
run: |
21-
echo "Event: ${{ github.event.workflow_run.event }} Conclusion: ${{ github.event.workflow_run.conclusion }}"
22-
- name: 'Download artifact'
23-
uses: actions/github-script@v6
24-
with:
25-
script: |
26-
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
27-
owner: context.repo.owner,
28-
repo: context.repo.repo,
29-
run_id: context.payload.workflow_run.id
30-
});
31-
const matchArtifact = artifacts.data.artifacts.find((artifact) =>
32-
artifact.name === 'pr'
33-
);
34-
const download = await github.rest.actions.downloadArtifact({
35-
owner: context.repo.owner,
36-
repo: context.repo.repo,
37-
artifact_id: matchArtifact.id,
38-
archive_format: 'zip'
39-
});
40-
const { writeFileSync } = require('node:fs');
41-
writeFileSync('${{ github.workspace }}/pr.zip', Buffer.from(download.data));
42-
43-
- run: unzip pr.zip
44-
45-
- name: "Get PR Number"
46-
id: vars
47-
run:
48-
echo "pr-number=$(cat NR)" >> "$GITHUB_OUTPUT"
49-
5031
- uses: actions/labeler@v4
5132
with:
5233
configuration-path: .github/new-prs-labeler.yml
5334
# workaround for https://github.com/actions/labeler/issues/112
5435
sync-labels: ''
5536
repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}
56-
pr-number: ${{ steps.vars.outputs.pr-number }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
- name: Fetch LLVM sources
1111
uses: actions/checkout@v4
1212
with:
13-
fetch-depth: 2
13+
fetch-depth: 2 # Fetches only the last 2 commits
1414

1515
- name: Get changed files
1616
id: changed-files
1717
uses: tj-actions/changed-files@v39
1818
with:
1919
separator: ","
20-
fetch_depth: 100 # Fetches only the last 10 commits
20+
fetch_depth: 2000 # Fetches only the last 2000 commits
2121

2222
- name: "Listed files"
2323
run: |

.github/workflows/pr-receive-label.yml

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

.github/workflows/pr-receive.yml

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

0 commit comments

Comments
 (0)