Skip to content

Commit cd65f9f

Browse files
committed
Merge commit 'e6c3289804a6' into main
Update LLVM to 18.1.4 version
2 parents 49f9322 + e6c3289 commit cd65f9f

File tree

1,056 files changed

+55910
-5083
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,056 files changed

+55910
-5083
lines changed

.ci/generate-buildkite-pipeline-premerge

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ set -o pipefail
2222

2323
# Environment variables script works with:
2424

25-
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
26-
git fetch origin main:main
25+
# Set by buildkite
26+
: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=}
27+
: ${BUILDKITE_COMMIT:=}
28+
: ${BUILDKITE_BRANCH:=}
29+
# Fetch origin to have an up to date merge base for the diff.
30+
git fetch origin
2731
# List of files affected by this commit
28-
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
32+
: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)}
2933
# Filter rules for generic windows tests
3034
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
3135
# Filter rules for generic linux tests
3236
: ${LINUX_AGENTS:='{"queue": "linux"}'}
3337
# Service agents, for interacting with Phabricator.
3438
: ${SERVICE_AGENTS:='{"queue": "service"}'}
35-
# Set by buildkite
36-
: ${BUILDKITE_COMMIT:=}
37-
: ${BUILDKITE_BRANCH:=}
3839

3940
reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')"
4041
if [[ "${reviewID}" != "" ]]; then

.github/workflows/libclc-tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ jobs:
3636
name: Test libclc
3737
uses: ./.github/workflows/llvm-project-tests.yml
3838
with:
39-
build_target: ''
4039
projects: clang;libclc

.github/workflows/lldb-tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ jobs:
3636
name: Build lldb
3737
uses: ./.github/workflows/llvm-project-tests.yml
3838
with:
39-
build_target: ''
4039
projects: clang;lldb

.github/workflows/llvm-project-tests.yml

+43-12
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ on:
1414
required: false
1515
os_list:
1616
required: false
17-
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
17+
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
1818
python_version:
1919
required: false
2020
type: string
2121
default: '3.11'
2222
workflow_call:
2323
inputs:
2424
build_target:
25-
required: true
25+
required: false
2626
type: string
27+
default: "all"
2728

2829
projects:
2930
required: true
@@ -38,9 +39,7 @@ on:
3839
type: string
3940
# Use windows-2019 due to:
4041
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
41-
# We're using a specific version of macOS due to:
42-
# https://github.com/actions/virtual-environments/issues/5900
43-
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
42+
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
4443

4544
python_version:
4645
required: false
@@ -59,6 +58,10 @@ jobs:
5958
lit-tests:
6059
name: Lit Tests
6160
runs-on: ${{ matrix.os }}
61+
container:
62+
image: ${{(startsWith(matrix.os, 'ubuntu') && 'ghcr.io/llvm/ci-ubuntu-22.04:latest') || null}}
63+
volumes:
64+
- /mnt/:/mnt/
6265
strategy:
6366
fail-fast: false
6467
matrix:
@@ -78,6 +81,7 @@ jobs:
7881
with:
7982
python-version: ${{ inputs.python_version }}
8083
- name: Install Ninja
84+
if: runner.os != 'Linux'
8185
uses: llvm/actions/install-ninja@main
8286
# actions/checkout deletes any existing files in the new git directory,
8387
# so this needs to either run before ccache-action or it has to use
@@ -95,24 +99,51 @@ jobs:
9599
# run creates a new cache entry so we want to ensure that we have
96100
# enough cache space for all the tests to run at once and still
97101
# fit under the 10 GB limit.
98-
max-size: 500M
102+
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
103+
max-size: 2G
99104
key: ${{ matrix.os }}
100105
variant: sccache
101106
- name: Build and Test
102-
uses: llvm/actions/build-test-llvm-project@main
103107
env:
104108
# Workaround for https://github.com/actions/virtual-environments/issues/5900.
105109
# This should be a no-op for non-mac OSes
106110
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
107-
with:
108-
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ inputs.extra_cmake_args }}'
109-
build_target: '${{ inputs.build_target }}'
111+
shell: bash
112+
id: build-llvm
113+
run: |
114+
if [ "${{ runner.os }}" == "Linux" ]; then
115+
builddir="/mnt/build/"
116+
mkdir -p $builddir
117+
extra_cmake_args="-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
118+
else
119+
builddir="$(pwd)"/build
120+
fi
121+
if [ "${{ runner.os }}" == "macOS" ]; then
122+
# Workaround test failure on some lld tests on MacOS
123+
# https://github.com/llvm/llvm-project/issues/81967
124+
extra_cmake_args="-DLLVM_DISABLE_ASSEMBLY_FILES=ON"
125+
fi
126+
echo "llvm-builddir=$builddir" >> "$GITHUB_OUTPUT"
127+
cmake -G Ninja \
128+
-B "$builddir" \
129+
-S llvm \
130+
-DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" \
131+
-DCMAKE_BUILD_TYPE=Release \
132+
-DLLVM_ENABLE_ASSERTIONS=ON \
133+
-DLLDB_INCLUDE_TESTS=OFF \
134+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
135+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
136+
$extra_cmake_args \
137+
${{ inputs.extra_cmake_args }}
138+
ninja -C "$builddir" '${{ inputs.build_target }}'
110139
111140
- name: Build and Test libclc
112141
if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')"
142+
env:
143+
LLVM_BUILDDIR: ${{ steps.build-llvm.outputs.llvm-builddir }}
113144
run: |
114145
# Make sure all of LLVM libraries that llvm-config needs are built.
115-
ninja -C build
116-
cmake -G Ninja -S libclc -B libclc-build -DLLVM_DIR="$(pwd)"/build/lib/cmake/llvm -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
146+
ninja -C "$LLVM_BUILDDIR"
147+
cmake -G Ninja -S libclc -B libclc-build -DLLVM_DIR="$LLVM_BUILDDIR"/lib/cmake/llvm -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
117148
ninja -C libclc-build
118149
ninja -C libclc-build test

.github/workflows/llvm-tests.yml

+15-25
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,13 @@ concurrency:
2727
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2828

2929
jobs:
30-
check_all:
30+
check-all:
3131
if: github.repository_owner == 'llvm'
32-
name: Test llvm,clang,libclc
32+
name: Build and Test
3333
uses: ./.github/workflows/llvm-project-tests.yml
3434
with:
3535
build_target: check-all
36-
projects: clang;libclc
37-
38-
# These need to be separate from the check_all job, becuase there is not enough disk
39-
# space to build all these projects on Windows.
40-
build_lldb:
41-
if: github.repository_owner == 'llvm'
42-
name: Build lldb
43-
uses: ./.github/workflows/llvm-project-tests.yml
44-
with:
45-
build_target: ''
46-
projects: clang;lldb
47-
48-
check_lld:
49-
if: github.repository_owner == 'llvm'
50-
name: Test lld
51-
uses: ./.github/workflows/llvm-project-tests.yml
52-
with:
53-
build_target: check-lld
54-
projects: lld
36+
projects: clang;lld;libclc;lldb
5537

5638
abi-dump-setup:
5739
if: github.repository_owner == 'llvm'
@@ -60,6 +42,7 @@ jobs:
6042
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
6143
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
6244
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
45+
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
6346
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
6447
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
6548
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
@@ -76,7 +59,14 @@ jobs:
7659
- name: Setup Variables
7760
id: vars
7861
run: |
79-
if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 ] || [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
62+
# C++ ABI:
63+
# 18.1.0 we aren't doing ABI checks.
64+
# 18.1.1 We want to check 18.1.0.
65+
# C ABI:
66+
# 18.1.0 We want to check 17.0.x
67+
# 18.1.1 We want to check 18.1.0
68+
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
69+
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
8070
{
8171
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))"
8272
echo "ABI_HEADERS=llvm-c"
@@ -100,7 +90,7 @@ jobs:
10090
include:
10191
- name: build-baseline
10292
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
103-
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
93+
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0
10494
repo: llvm/llvm-project
10595
- name: build-latest
10696
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
@@ -143,7 +133,7 @@ jobs:
143133
else
144134
touch llvm.symbols
145135
fi
146-
abi-dumper "$EXTRA_ARGS" -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
136+
abi-dumper $EXTRA_ARGS -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
147137
# Remove symbol versioning from dumps, so we can compare across major versions.
148138
sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi
149139
- name: Upload ABI file
@@ -193,7 +183,7 @@ jobs:
193183
# FIXME: Reading of gzip'd abi files on the GitHub runners stop
194184
# working some time in March of 2021, likely due to a change in the
195185
# runner's environment.
196-
abi-compliance-checker "$EXTRA_ARGS" -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
186+
abi-compliance-checker $EXTRA_ARGS -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
197187
- name: Upload ABI Comparison
198188
if: always()
199189
uses: actions/upload-artifact@v3

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Check code formatting"
2-
on: pull_request_target
2+
on:
3+
pull_request_target:
4+
branches:
5+
- main
6+
37
permissions:
48
pull-requests: write
59

.github/workflows/release-lit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
cd llvm/utils/lit
5959
# Remove 'dev' suffix from lit version.
6060
sed -i 's/ + "dev"//g' lit/__init__.py
61-
python3 setup.py sdist
61+
python3 setup.py sdist bdist_wheel
6262
6363
- name: Upload lit to test.pypi.org
6464
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release-tasks.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
name: Create a New Release
2929
runs-on: ubuntu-latest
3030
needs: validate-tag
31+
3132
steps:
3233
- name: Install Dependencies
3334
run: |
@@ -40,8 +41,9 @@ jobs:
4041
- name: Create Release
4142
env:
4243
GITHUB_TOKEN: ${{ github.token }}
44+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
4345
run: |
44-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} create
46+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} --user-token "$USER_TOKEN" create
4547
release-documentation:
4648
name: Build and Upload Release Documentation
4749
needs:

.github/workflows/version-check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_version_from_tag(tag):
1616

1717
m = re.match("llvmorg-([0-9]+)-init", tag)
1818
if m:
19-
return (m.group(1), "0", "0")
19+
return (m.group(1), "1", "0")
2020

2121
raise Exception(f"error: Tag is not valid: {tag}")
2222

0 commit comments

Comments
 (0)