Skip to content

Commit 2b6c51c

Browse files
committed
Merge release/21.x into cheriot
2 parents 601094a + 33e1a55 commit 2b6c51c

File tree

64 files changed

+1645
-260
lines changed

Some content is hidden

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

64 files changed

+1645
-260
lines changed

.github/workflows/libclang-abi-tests.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
3939
steps:
4040
- name: Checkout source
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4242
with:
4343
fetch-depth: 250
4444

@@ -84,6 +84,8 @@ jobs:
8484
if: github.repository_owner == 'llvm'
8585
needs: abi-dump-setup
8686
runs-on: ubuntu-24.04
87+
container:
88+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
8789
strategy:
8890
matrix:
8991
name:
@@ -100,23 +102,12 @@ jobs:
100102
repo: ${{ github.repository }}
101103
steps:
102104
- name: Install Ninja
103-
uses: llvm/actions/install-ninja@main
104-
- name: Install abi-compliance-checker
105-
run: |
106-
sudo apt-get update
107-
sudo apt-get install -y abi-dumper autoconf pkg-config
108-
- name: Install universal-ctags
109-
run: |
110-
git clone https://github.com/universal-ctags/ctags.git
111-
cd ctags
112-
./autogen.sh
113-
./configure
114-
sudo make install
105+
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
115106
- name: Download source code
116-
uses: llvm/actions/get-llvm-project-src@main
107+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117108
with:
118109
ref: ${{ matrix.ref }}
119-
repo: ${{ matrix.repo }}
110+
repository: ${{ matrix.repo }}
120111
- name: Configure
121112
run: |
122113
mkdir install
@@ -131,41 +122,39 @@ jobs:
131122
sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' $lib-${{ matrix.ref }}.abi
132123
done
133124
- name: Upload ABI file
134-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
125+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
135126
with:
136127
name: ${{ matrix.name }}
137128
path: '*${{ matrix.ref }}.abi'
138129

139130
abi-compare:
140131
if: github.repository_owner == 'llvm'
141132
runs-on: ubuntu-24.04
133+
container:
134+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
142135
needs:
143136
- abi-dump-setup
144137
- abi-dump
145138
steps:
146139
- name: Download baseline
147-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
140+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
148141
with:
149142
name: build-baseline
150143
path: build-baseline
151144
- name: Download latest
152-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
145+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
153146
with:
154147
name: build-latest
155148
path: build-latest
156149

157-
- name: Install abi-compliance-checker
158-
run: |
159-
sudo apt-get update
160-
sudo apt-get install -y abi-compliance-checker
161150
- name: Compare ABI
162151
run: |
163152
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
164153
abi-compliance-checker -lib $lib -old build-baseline/$lib*.abi -new build-latest/$lib*.abi
165154
done
166155
- name: Upload ABI Comparison
167156
if: always()
168-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
157+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
169158
with:
170159
name: compat-report-${{ github.sha }}
171160
path: compat_reports/

.github/workflows/llvm-tests.yml renamed to .github/workflows/llvm-abi-tests.yml

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: LLVM Tests
1+
name: LLVM ABI Tests
22

33
permissions:
44
contents: read
@@ -10,13 +10,13 @@ on:
1010
- 'release/**'
1111
paths:
1212
- 'llvm/**'
13-
- '.github/workflows/llvm-tests.yml'
13+
- '.github/workflows/llvm-abi-tests.yml'
1414
pull_request:
1515
branches:
1616
- 'release/**'
1717
paths:
1818
- 'llvm/**'
19-
- '.github/workflows/llvm-tests.yml'
19+
- '.github/workflows/llvm-abi-tests.yml'
2020

2121
concurrency:
2222
# Skip intermediate builds: always.
@@ -38,7 +38,7 @@ jobs:
3838
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
3939
steps:
4040
- name: Checkout source
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4242
with:
4343
fetch-depth: 250
4444

@@ -72,6 +72,8 @@ jobs:
7272
if: github.repository_owner == 'llvm'
7373
needs: abi-dump-setup
7474
runs-on: ubuntu-24.04
75+
container:
76+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:01e66b0847c1e9c88f0bd0492ed7c3374550a0730b48040f63888393f1ff6c13" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b"
7577
strategy:
7678
matrix:
7779
name:
@@ -87,24 +89,11 @@ jobs:
8789
ref: ${{ github.sha }}
8890
repo: ${{ github.repository }}
8991
steps:
90-
- name: Install Ninja
91-
uses: llvm/actions/install-ninja@main
92-
- name: Install abi-compliance-checker
93-
run: |
94-
sudo apt-get update
95-
sudo apt-get -y install abi-dumper autoconf pkg-config
96-
- name: Install universal-ctags
97-
run: |
98-
git clone https://github.com/universal-ctags/ctags.git
99-
cd ctags
100-
./autogen.sh
101-
./configure
102-
sudo make install
10392
- name: Download source code
104-
uses: llvm/actions/get-llvm-project-src@main
93+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
10594
with:
10695
ref: ${{ matrix.ref }}
107-
repo: ${{ matrix.repo }}
96+
repository: ${{ matrix.repo }}
10897
- name: Configure
10998
run: |
11099
mkdir install
@@ -128,45 +117,43 @@ jobs:
128117
# Remove symbol versioning from dumps, so we can compare across major versions.
129118
sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi
130119
- name: Upload ABI file
131-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
120+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
132121
with:
133122
name: ${{ matrix.name }}
134123
path: ${{ matrix.ref }}.abi
135124

136125
- name: Upload symbol list file
137126
if: matrix.name == 'build-baseline'
138-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
127+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
139128
with:
140129
name: symbol-list
141130
path: llvm.symbols
142131

143132
abi-compare:
144133
if: github.repository_owner == 'llvm'
145134
runs-on: ubuntu-24.04
135+
container:
136+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:01e66b0847c1e9c88f0bd0492ed7c3374550a0730b48040f63888393f1ff6c13" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b
146137
needs:
147138
- abi-dump-setup
148139
- abi-dump
149140
steps:
150141
- name: Download baseline
151-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
142+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
152143
with:
153144
name: build-baseline
154145
path: build-baseline
155146
- name: Download latest
156-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
147+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
157148
with:
158149
name: build-latest
159150
path: build-latest
160151
- name: Download symbol list
161-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
152+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
162153
with:
163154
name: symbol-list
164155
path: symbol-list
165156

166-
- name: Install abi-compliance-checker
167-
run: |
168-
sudo apt-get update
169-
sudo apt-get -y install abi-compliance-checker
170157
- name: Compare ABI
171158
run: |
172159
if [ -s symbol-list/llvm.symbols ]; then
@@ -179,7 +166,7 @@ jobs:
179166
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"
180167
- name: Upload ABI Comparison
181168
if: always()
182-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
169+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
183170
with:
184171
name: compat-report-${{ github.sha }}
185172
path: compat_reports/

.github/workflows/premerge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
uses: llvm/actions/install-ninja@main
150150
- name: Build and Test
151151
run: |
152-
source <(git diff --name-only HEAD~2..HEAD | python3 .ci/compute_projects.py)
152+
source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py)
153153
154154
if [[ "${projects_to_build}" == "" ]]; then
155155
echo "No projects to build"

.github/workflows/release-documentation.yml

Lines changed: 4 additions & 0 deletions
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+
WWW_RELEASES_TOKEN:
30+
description: "Secret used to create a PR with the documentation changes."
31+
required: false
2832

2933
jobs:
3034
release-documentation:

.github/workflows/release-tasks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
with:
5555
release-version: ${{ needs.validate-tag.outputs.release-version }}
5656
upload: true
57+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
58+
secrets:
59+
WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
5760

5861
release-doxygen:
5962
name: Build and Upload Release Doxygen

clang/cmake/caches/Release.cmake

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ set(LLVM_RELEASE_ENABLE_LTO THIN CACHE STRING "")
4848
set(LLVM_RELEASE_ENABLE_PGO ON CACHE BOOL "")
4949
set(LLVM_RELEASE_ENABLE_RUNTIMES ${DEFAULT_RUNTIMES} CACHE STRING "")
5050
set(LLVM_RELEASE_ENABLE_PROJECTS ${DEFAULT_PROJECTS} CACHE STRING "")
51+
52+
# This option enables linking stage2 clang statically with the runtimes
53+
# (libc++ and compiler-rt) from stage1. In theory this will give the
54+
# binaries better performance and make them more portable. However,
55+
# this configuration is not well tested and causes build failures with
56+
# the flang-rt tests cases, since the -stclib=libc++ flag does not
57+
# get propagated to the runtimes build. There is also a separate
58+
# issue on Darwin where clang will use the local libc++ headers, but
59+
# link with system libc++ which can cause some incompatibilities.
60+
# See https://github.com/llvm/llvm-project/issues/77653
61+
# Because of these problems, this option will default to OFF.
62+
set(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES OFF CACHE BOOL "")
63+
5164
# Note we don't need to add install here, since it is one of the pre-defined
5265
# steps.
5366
set(LLVM_RELEASE_FINAL_STAGE_TARGETS "clang;package;check-all;check-llvm;check-clang" CACHE STRING "")
@@ -59,8 +72,12 @@ set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
5972

6073
set(STAGE1_PROJECTS "clang")
6174

75+
# Need to build compiler-rt in order to use PGO for later stages.
76+
set(STAGE1_RUNTIMES "compiler-rt")
6277
# Build all runtimes so we can statically link them into the stage2 compiler.
63-
set(STAGE1_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind")
78+
if(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES)
79+
list(APPEND STAGE1_RUNTIMES "libcxx;libcxxabi;libunwind")
80+
endif()
6481

6582
if (LLVM_RELEASE_ENABLE_PGO)
6683
list(APPEND STAGE1_PROJECTS "lld")
@@ -122,21 +139,25 @@ set_instrument_and_final_stage_var(LLVM_ENABLE_LTO "${LLVM_RELEASE_ENABLE_LTO}"
122139
if (LLVM_RELEASE_ENABLE_LTO)
123140
set_instrument_and_final_stage_var(LLVM_ENABLE_LLD "ON" BOOL)
124141
endif()
125-
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
126-
set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
127-
set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
128-
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
129-
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
142+
if(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES)
143+
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
144+
set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
145+
set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
146+
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
147+
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
148+
endif()
130149
endif()
131150

132151
# Set flags for bolt
133152
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
134153
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -Wl,--emit-relocs,-znow")
135154
endif()
136155

137-
set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
138-
set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
139-
set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
156+
if (RELEASE_LINKER_FLAGS)
157+
set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
158+
set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
159+
set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
160+
endif()
140161

141162
# Final Stage Config (stage2)
142163
set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)

clang/lib/Sema/SemaChecking.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12423,13 +12423,20 @@ static void DiagnoseMixedUnicodeImplicitConversion(Sema &S, const Type *Source,
1242312423
SourceLocation CC) {
1242412424
assert(Source->isUnicodeCharacterType() && Target->isUnicodeCharacterType() &&
1242512425
Source != Target);
12426+
12427+
// Lone surrogates have a distinct representation in UTF-32.
12428+
// Converting between UTF-16 and UTF-32 codepoints seems very widespread,
12429+
// so don't warn on such conversion.
12430+
if (Source->isChar16Type() && Target->isChar32Type())
12431+
return;
12432+
1242612433
Expr::EvalResult Result;
1242712434
if (E->EvaluateAsInt(Result, S.getASTContext(), Expr::SE_AllowSideEffects,
1242812435
S.isConstantEvaluatedContext())) {
1242912436
llvm::APSInt Value(32);
1243012437
Value = Result.Val.getInt();
1243112438
bool IsASCII = Value <= 0x7F;
12432-
bool IsBMP = Value <= 0xD7FF || (Value >= 0xE000 && Value <= 0xFFFF);
12439+
bool IsBMP = Value <= 0xDFFF || (Value >= 0xE000 && Value <= 0xFFFF);
1243312440
bool ConversionPreservesSemantics =
1243412441
IsASCII || (!Source->isChar8Type() && !Target->isChar8Type() && IsBMP);
1243512442

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,8 +4345,7 @@ class ASTDeclContextNameLookupTrait
43454345
// parent of parent. We DON'T remove the enum constant from its parent. So
43464346
// we don't need to care about merging problems here.
43474347
if (auto *ECD = dyn_cast<EnumConstantDecl>(D);
4348-
ECD && DC.isFileContext() && ECD->getOwningModule() &&
4349-
ECD->getTopLevelOwningNamedModule()->isNamedModule()) {
4348+
ECD && DC.isFileContext() && ECD->getTopLevelOwningNamedModule()) {
43504349
if (llvm::all_of(
43514350
DC.noload_lookup(
43524351
cast<EnumDecl>(ECD->getDeclContext())->getDeclName()),

clang/test/Driver/aarch64-v96a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
// RUN: %clang -target aarch64 -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
77
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
88
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A %s
9-
// GENERICV96A: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"{{.*}} "-target-feature" "+cmpbr"{{.*}} "-target-feature" "+fprcvt"{{.*}} "-target-feature" "+sve2p2"
9+
// GENERICV96A: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"{{.*}} "-target-feature" "+cmpbr"{{.*}}
1010

1111
// RUN: %clang -target aarch64_be -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
1212
// RUN: %clang -target aarch64_be -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
1313
// RUN: %clang -target aarch64 -mbig-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
1414
// RUN: %clang -target aarch64 -mbig-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
1515
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
1616
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV96A-BE %s
17-
// GENERICV96A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"{{.*}} "-target-feature" "+cmpbr"{{.*}} "-target-feature" "+fprcvt"{{.*}} "-target-feature" "+sve2p2"
17+
// GENERICV96A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.6a"{{.*}} "-target-feature" "+cmpbr"{{.*}}
1818

1919
// ===== Features supported on aarch64 =====
2020

0 commit comments

Comments
 (0)