Skip to content

Commit b29925d

Browse files
authored
Merge branch 'main' into simd_unary
2 parents 75262c7 + 615a5eb commit b29925d

File tree

17,149 files changed

+1297273
-800846
lines changed

Some content is hidden

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

17,149 files changed

+1297273
-800846
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,17 @@ function keep-modified-projects() {
191191
}
192192

193193
function check-targets() {
194+
# Do not use "check-all" here because if there is "check-all" plus a
195+
# project specific target like "check-clang", that project's tests
196+
# will be run twice.
194197
projects=${@}
195198
for project in ${projects}; do
196199
case ${project} in
197200
clang-tools-extra)
198201
echo "check-clang-tools"
199202
;;
200203
compiler-rt)
201-
echo "check-all"
204+
echo "check-compiler-rt"
202205
;;
203206
cross-project-tests)
204207
echo "check-cross-project"
@@ -216,10 +219,10 @@ function check-targets() {
216219
echo "check-lldb"
217220
;;
218221
pstl)
219-
echo "check-all"
222+
# Currently we do not run pstl tests in CI.
220223
;;
221224
libclc)
222-
echo "check-all"
225+
# Currently there is no testing for libclc.
223226
;;
224227
*)
225228
echo "check-${project}"

.github/new-prs-labeler.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ PGO:
6969
- llvm/**/llvm-profdata/**/*
7070
- llvm/**/llvm-profgen/**/*
7171

72-
vectorization:
72+
vectorizers:
7373
- llvm/lib/Transforms/Vectorize/**/*
7474
- llvm/include/llvm/Transforms/Vectorize/**/*
7575

@@ -668,7 +668,7 @@ mlgo:
668668
- llvm/lib/CodeGen/ML*
669669
- llvm/unittests/CodeGen/ML*
670670
- llvm/test/CodeGen/MLRegAlloc/**
671-
- llvm/utils/mlgo-utils/*
671+
- llvm/utils/mlgo-utils/**
672672

673673
tools:llvm-exegesis:
674674
- llvm/tools/llvm-exegesis/**
@@ -1008,3 +1008,8 @@ bazel:
10081008

10091009
offload:
10101010
- offload/**
1011+
1012+
tablegen:
1013+
- llvm/include/TableGen/**
1014+
- llvm/lib/TableGen/**
1015+
- llvm/utils/TableGen/**

.github/workflows/commit-access-review.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@ def main():
358358
gh = github.Github(login_or_token=token)
359359
org = gh.get_organization("llvm")
360360
repo = org.get_repo("llvm-project")
361-
team = org.get_team_by_slug("llvm-committers")
362361
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
363362
triage_list = {}
364-
for member in team.get_members():
365-
triage_list[member.login] = User(member.login, triage_list)
363+
for collaborator in repo.get_collaborators(permission="push"):
364+
triage_list[collaborator.login] = User(collaborator.login, triage_list)
366365

367366
print("Start:", len(triage_list), "triagers")
368367
# Step 0 Check if users have requested commit access in the last year.

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

Lines changed: 1 addition & 1 deletion
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=18.1.8
5+
ENV LLVM_VERSION=19.1.2
66

77
RUN apt-get update && \
88
apt-get install -y \

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jobs:
146146
'generic-no-experimental',
147147
'generic-no-filesystem',
148148
'generic-no-localization',
149+
'generic-no-terminal',
149150
'generic-no-random_device',
150151
'generic-no-threads',
151152
'generic-no-tzdb',
@@ -190,6 +191,49 @@ jobs:
190191
**/CMakeError.log
191192
**/CMakeOutput.log
192193
**/crash_diagnostics/*
194+
195+
macos:
196+
needs: [ stage1 ]
197+
strategy:
198+
fail-fast: false
199+
matrix:
200+
include:
201+
- config: generic-cxx03
202+
os: macos-latest
203+
- config: generic-cxx23
204+
os: macos-latest
205+
- config: generic-modules
206+
os: macos-latest
207+
- config: apple-configuration
208+
os: macos-latest
209+
- config: apple-system
210+
os: macos-13
211+
- config: apple-system-hardened
212+
os: macos-13
213+
runs-on: ${{ matrix.os }}
214+
steps:
215+
- uses: actions/checkout@v4
216+
- uses: maxim-lobanov/setup-xcode@v1
217+
with:
218+
xcode-version: 'latest'
219+
- uses: seanmiddleditch/gha-setup-ninja@master
220+
- name: Build and test
221+
run: |
222+
python3 -m venv .venv
223+
source .venv/bin/activate
224+
python -m pip install psutil
225+
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
226+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
227+
if: always() # Upload artifacts even if the build or test suite fails
228+
with:
229+
name: macos-${{ matrix.config }}-results
230+
path: |
231+
**/test-results.xml
232+
**/*.abilist
233+
**/CMakeError.log
234+
**/CMakeOutput.log
235+
**/crash_diagnostics/*
236+
193237
windows:
194238
runs-on: windows-2022
195239
needs: [ stage1 ]
@@ -205,6 +249,7 @@ jobs:
205249
- { config: mingw-dll, mingw: true }
206250
- { config: mingw-static, mingw: true }
207251
- { config: mingw-dll-i686, mingw: true }
252+
- { config: mingw-incomplete-sysroot, mingw: true }
208253
steps:
209254
- uses: actions/checkout@v4
210255
- name: Install dependencies
@@ -223,6 +268,12 @@ jobs:
223268
del llvm-mingw*.zip
224269
mv llvm-mingw* c:\llvm-mingw
225270
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
271+
- name: Simulate a from-scratch build of llvm-mingw
272+
if: ${{ matrix.config == 'mingw-incomplete-sysroot' }}
273+
run: |
274+
rm -r c:\llvm-mingw\include\c++
275+
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++*
276+
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind*
226277
- name: Add Git Bash to the path
227278
run: |
228279
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
jobs:
1313
code_formatter:
1414
runs-on: ubuntu-latest
15+
timeout-minutes: 30
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
1519
if: github.repository == 'llvm/llvm-project'
1620
steps:
1721
- name: Fetch LLVM sources

.github/workflows/release-asset-audit.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
import github
22
import sys
33

4+
_SPECIAL_CASE_BINARIES = {
5+
"keith": {"clang+llvm-18.1.8-arm64-apple-macos11.tar.xz"},
6+
}
7+
8+
9+
def _is_valid(uploader_name, valid_uploaders, asset_name):
10+
if uploader_name in valid_uploaders:
11+
return True
12+
13+
if uploader_name in _SPECIAL_CASE_BINARIES:
14+
return asset_name in _SPECIAL_CASE_BINARIES[uploader_name]
15+
16+
return False
17+
18+
419
def main():
520
token = sys.argv[1]
621

@@ -41,7 +56,7 @@ def main():
4156
print(
4257
f"{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )"
4358
)
44-
if asset.uploader.login not in uploaders:
59+
if not _is_valid(asset.uploader.login, uploaders, asset.name):
4560
with open('comment', 'w') as file:
4661
file.write(f'@{asset.uploader.login} is not a valid uploader.')
4762
sys.exit(1)

.github/workflows/release-binaries-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ on:
4343
- '.github/workflows/release-binaries.yml'
4444
- '.github/workflows/release-binaries-setup-stage/*'
4545
- '.github/workflows/release-binaries-save-stage/*'
46+
- 'clang/cmake/caches/Release.cmake'
4647

4748
concurrency:
4849
group: ${{ github.workflow }}-${{ github.event.pull_request.number || 'dispatch' }}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
required: true
1111
type: 'string'
1212

13+
permissions:
14+
contents: read
15+
1316
runs:
1417
using: "composite"
1518
steps:
@@ -18,6 +21,9 @@ runs:
1821
- name: Package Build and Source Directories
1922
shell: bash
2023
run: |
24+
# Remove .git/config to avoid leaking GITHUB_TOKEN stored there.
25+
# See https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/
26+
rm -Rf .git/config
2127
# Windows does not support symlinks, so we need to dereference them.
2228
tar --exclude build/ ${{ (runner.os == 'Windows' && '-h') || '' }} -c . | zstd -T0 -c > ../llvm-project.tar.zst
2329
mv ../llvm-project.tar.zst .

.github/workflows/release-binaries.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,8 @@ jobs:
135135
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
136136
fi
137137
138-
# x86 macOS and x86 Windows have trouble building flang, so disable it.
139-
# Windows: https://github.com/llvm/llvm-project/issues/100202
140-
# macOS: 'rebase opcodes terminated early at offset 1 of 80016' when building __fortran_builtins.mod
141138
build_flang="true"
142139
143-
if [ "$target" = "Windows-X64" ]; then
144-
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_PROJECTS=\"clang;lld;lldb;clang-tools-extra;bolt;polly;mlir\""
145-
build_flang="false"
146-
fi
147-
148140
if [ "${{ runner.os }}" = "Windows" ]; then
149141
# The build times out on Windows, so we need to disable LTO.
150142
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
@@ -336,7 +328,7 @@ jobs:
336328
run: |
337329
# Build some of the mlir tools that take a long time to link
338330
if [ "${{ needs.prepare.outputs.build-flang }}" = "true" ]; then
339-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ -j2 flang-new bbc
331+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ -j2 flang bbc
340332
fi
341333
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ \
342334
mlir-bytecode-parser-fuzzer \
@@ -428,6 +420,14 @@ jobs:
428420
attestations: write # For artifact attestations
429421

430422
steps:
423+
- name: Checkout Release Scripts
424+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
425+
with:
426+
sparse-checkout: |
427+
llvm/utils/release/github-upload-release.py
428+
llvm/utils/git/requirements.txt
429+
sparse-checkout-cone-mode: false
430+
431431
- name: 'Download artifact'
432432
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
433433
with:
@@ -450,11 +450,14 @@ jobs:
450450
name: ${{ needs.prepare.outputs.release-binary-filename }}-attestation
451451
path: ${{ needs.prepare.outputs.release-binary-filename }}.jsonl
452452

453+
- name: Install Python Requirements
454+
run: |
455+
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
456+
453457
- name: Upload Release
454458
shell: bash
455459
run: |
456-
sudo apt install python3-github
457-
./llvm-project/llvm/utils/release/github-upload-release.py \
460+
./llvm/utils/release/github-upload-release.py \
458461
--token ${{ github.token }} \
459462
--release ${{ needs.prepare.outputs.release-version }} \
460463
upload \

.github/workflows/release-documentation.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,20 @@ jobs:
7272
ref: main
7373
fetch-depth: 0
7474
path: www-releases
75+
persist-credentials: false
7576

7677
- name: Upload Release Notes
7778
if: env.upload
7879
env:
79-
WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
80+
GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
8081
run: |
81-
mkdir -p ../www-releases/${{ inputs.release-version }}
82-
mv ./docs-build/html-export/* ../www-releases/${{ inputs.release-version }}
83-
cd ../www-releases
82+
mkdir -p www-releases/${{ inputs.release-version }}
83+
mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }}
84+
cd www-releases
85+
git checkout -b ${{ inputs.release-version }}
8486
git add ${{ inputs.release-version }}
8587
git config user.email "[email protected]"
8688
git config user.name "llvmbot"
8789
git commit -a -m "Add ${{ inputs.release-version }} documentation"
88-
git push "https://[email protected]/${{ github.repository_owner }}/www-releases" main:main
90+
git push --force "https://[email protected]/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }}
91+
gh pr create -f -B main -H ${{ inputs.release-version }} -R llvmbot/www-releases

.github/workflows/release-doxygen.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
description: 'Upload documentation'
2626
required: false
2727
type: boolean
28+
secrets:
29+
RELEASE_TASKS_USER_TOKEN:
30+
description: "Secret used to check user permissions."
31+
required: false
2832

2933
jobs:
3034
release-doxygen:
@@ -63,5 +67,6 @@ jobs:
6367
if: env.upload
6468
env:
6569
GITHUB_TOKEN: ${{ github.token }}
70+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
6671
run: |
67-
./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" upload --files ./*doxygen*.tar.xz
72+
./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" --user-token "$USER_TOKEN" upload --files ./*doxygen*.tar.xz

.github/workflows/release-lit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
description: 'Release Version'
1818
required: true
1919
type: string
20+
secrets:
21+
RELEASE_TASKS_USER_TOKEN:
22+
description: "Secret used to check user permissions."
23+
required: false
2024

2125
jobs:
2226
release-lit:
@@ -36,8 +40,9 @@ jobs:
3640
- name: Check Permissions
3741
env:
3842
GITHUB_TOKEN: ${{ github.token }}
43+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
3944
run: |
40-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} check-permissions
45+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
4146
4247
- name: Setup Cpp
4348
uses: aminya/setup-cpp@v1

.github/workflows/release-sources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
description: Release Version
1717
required: true
1818
type: string
19+
secrets:
20+
RELEASE_TASKS_USER_TOKEN:
21+
description: "Secret used to check user permissions."
22+
required: false
1923
# Run on pull_requests for testing purposes.
2024
pull_request:
2125
paths:

0 commit comments

Comments
 (0)