Skip to content

Commit 5b61926

Browse files
authored
Merge branch 'main' into pad_poison
2 parents 46b37d0 + 477a65a commit 5b61926

File tree

378 files changed

+26353
-3991
lines changed

Some content is hidden

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

378 files changed

+26353
-3991
lines changed

.ci/compute_projects.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
"libc", # No Windows Support.
101101
"lldb", # TODO(issues/132800): Needs environment setup.
102102
"bolt", # No Windows Support.
103+
"libcxx",
104+
"libcxxabi",
105+
"libunwind",
103106
}
104107

105108
# These are projects that we should test if the project itself is changed but
@@ -118,6 +121,9 @@
118121
"lldb",
119122
"openmp",
120123
"polly",
124+
"libcxx",
125+
"libcxxabi",
126+
"libunwind",
121127
}
122128

123129
PROJECT_CHECK_TARGETS = {

.ci/compute_projects_test.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ def test_llvm_windows(self):
4545
env_variables["project_check_targets"],
4646
"check-clang check-clang-tools check-lld check-llvm check-mlir check-polly",
4747
)
48-
self.assertEqual(
49-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
50-
)
48+
self.assertEqual(env_variables["runtimes_to_build"], "")
5149
self.assertEqual(
5250
env_variables["runtimes_check_targets"],
5351
"",
5452
)
5553
self.assertEqual(
5654
env_variables["runtimes_check_targets_needs_reconfig"],
57-
"check-cxx check-cxxabi check-unwind",
55+
"",
5856
)
5957

6058
def test_llvm_mac(self):
@@ -69,16 +67,14 @@ def test_llvm_mac(self):
6967
env_variables["project_check_targets"],
7068
"check-clang check-clang-tools check-lld check-llvm check-mlir",
7169
)
72-
self.assertEqual(
73-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
74-
)
70+
self.assertEqual(env_variables["runtimes_to_build"], "")
7571
self.assertEqual(
7672
env_variables["runtimes_check_targets"],
7773
"",
7874
)
7975
self.assertEqual(
8076
env_variables["runtimes_check_targets_needs_reconfig"],
81-
"check-cxx check-cxxabi check-unwind",
77+
"",
8278
)
8379

8480
def test_clang(self):
@@ -119,16 +115,14 @@ def test_clang_windows(self):
119115
self.assertEqual(
120116
env_variables["project_check_targets"], "check-clang check-clang-tools"
121117
)
122-
self.assertEqual(
123-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
124-
)
118+
self.assertEqual(env_variables["runtimes_to_build"], "")
125119
self.assertEqual(
126120
env_variables["runtimes_check_targets"],
127121
"",
128122
)
129123
self.assertEqual(
130124
env_variables["runtimes_check_targets_needs_reconfig"],
131-
"check-cxx check-cxxabi check-unwind",
125+
"",
132126
)
133127
self.assertEqual(env_variables["enable_cir"], "OFF")
134128

@@ -298,18 +292,15 @@ def test_windows_ci(self):
298292
)
299293
self.assertEqual(
300294
env_variables["runtimes_to_build"],
301-
"libcxx;libcxxabi;libunwind",
295+
"",
302296
)
303297
self.assertEqual(
304298
env_variables["runtimes_check_targets"],
305299
"",
306300
)
307-
# TODO(boomanaiden154): We should not be emitting these on Windows.
308-
# It does not currently impact anything because we do not build the
309-
# runtimes on Windows though.
310301
self.assertEqual(
311302
env_variables["runtimes_check_targets_needs_reconfig"],
312-
"check-cxx check-cxxabi check-unwind",
303+
"",
313304
)
314305

315306
def test_lldb(self):

.ci/generate_test_report_github.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
"""Script to generate a build report for Github."""
55

66
import argparse
7+
import platform
78

89
import generate_test_report_lib
910

11+
PLATFORM_TITLES = {
12+
"Windows": ":window: Windows x64 Test Results",
13+
"Linux": ":penguin: Linux x64 Test Results",
14+
}
15+
1016
if __name__ == "__main__":
1117
parser = argparse.ArgumentParser()
12-
parser.add_argument(
13-
"title", help="Title of the test report, without Markdown formatting."
14-
)
1518
parser.add_argument("return_code", help="The build's return code.", type=int)
1619
parser.add_argument("junit_files", help="Paths to JUnit report files.", nargs="*")
1720
args = parser.parse_args()
1821

1922
report = generate_test_report_lib.generate_report_from_files(
20-
args.title, args.return_code, args.junit_files
23+
PLATFORM_TITLES[platform.system()], args.return_code, args.junit_files
2124
)
2225

2326
print(report)

.ci/monolithic-linux.sh

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,25 @@ function at-exit {
3838
# If building fails there will be no results files.
3939
shopt -s nullglob
4040

41-
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":penguin: Linux x64 Test Results" \
42-
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
41+
if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
42+
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
43+
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
44+
fi
4345
}
4446
trap at-exit EXIT
4547

48+
function start-group {
49+
groupname=$1
50+
if [[ "$GITHUB_ACTIONS" != "" ]]; then
51+
echo "::endgroup"
52+
echo "::group::$groupname"
53+
elif [[ "$POSTCOMMIT_CI" != "" ]]; then
54+
echo "@@@$STEP@@@"
55+
else
56+
echo "Starting $groupname"
57+
fi
58+
}
59+
4660
projects="${1}"
4761
targets="${2}"
4862
runtimes="${3}"
@@ -52,7 +66,7 @@ enable_cir="${6}"
5266

5367
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
5468

55-
echo "::group::cmake"
69+
start-group "CMake"
5670
export PIP_BREAK_SYSTEM_PACKAGES=1
5771
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
5872

@@ -83,49 +97,39 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
8397
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
8498
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
8599

86-
echo "::endgroup::"
87-
echo "::group::ninja"
100+
start-group "ninja"
88101

89102
# Targets are not escaped as they are passed as separate arguments.
90103
ninja -C "${BUILD_DIR}" -k 0 ${targets}
91104

92-
echo "::endgroup::"
93-
94105
if [[ "${runtime_targets}" != "" ]]; then
95-
echo "::group::ninja runtimes"
106+
start-group "ninja Runtimes"
96107

97108
ninja -C "${BUILD_DIR}" ${runtime_targets}
98-
99-
echo "::endgroup::"
100109
fi
101110

102111
# Compiling runtimes with just-built Clang and running their tests
103112
# as an additional testing for Clang.
104113
if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
105-
echo "::group::cmake runtimes C++26"
114+
start-group "CMake Runtimes C++26"
106115

107116
cmake \
108117
-D LIBCXX_TEST_PARAMS="std=c++26" \
109118
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
110119
"${BUILD_DIR}"
111120

112-
echo "::endgroup::"
113-
echo "::group::ninja runtimes C++26"
121+
start-group "ninja Runtimes C++26"
114122

115123
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
116124

117-
echo "::endgroup::"
118-
echo "::group::cmake runtimes clang modules"
125+
start-group "CMake Runtimes Clang Modules"
119126

120127
cmake \
121128
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
122129
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
123130
"${BUILD_DIR}"
124131

125-
echo "::endgroup::"
126-
echo "::group::ninja runtimes clang modules"
132+
start-group "ninja Runtimes Clang Modules"
127133

128134
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
129-
130-
echo "::endgroup::"
131135
fi

.ci/monolithic-windows.sh

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,30 @@ function at-exit {
3232

3333
# If building fails there will be no results files.
3434
shopt -s nullglob
35-
36-
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":window: Windows x64 Test Results" \
37-
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
35+
36+
if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
37+
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
38+
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
39+
fi
3840
}
3941
trap at-exit EXIT
4042

43+
function start-group {
44+
groupname=$1
45+
if [[ "$GITHUB_ACTIONS" != "" ]]; then
46+
echo "::endgroup"
47+
echo "::group::$groupname"
48+
elif [[ "$POSTCOMMIT_CI" != "" ]]; then
49+
echo "@@@$STEP@@@"
50+
else
51+
echo "Starting $groupname"
52+
fi
53+
}
54+
4155
projects="${1}"
4256
targets="${2}"
4357

44-
echo "::group::cmake"
58+
start-group "CMake"
4559
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
4660

4761
export CC=cl
@@ -71,10 +85,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7185
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
7286
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
7387

74-
echo "::endgroup::"
75-
echo "::group::ninja"
88+
start-group "ninja"
7689

7790
# Targets are not escaped as they are passed as separate arguments.
7891
ninja -C "${BUILD_DIR}" -k 0 ${targets}
79-
80-
echo "::endgroup"

.github/workflows/check-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ permissions:
55

66
on:
77
push:
8+
branches:
9+
- main
810
paths:
911
- '.ci/**'
1012
- '.github/workflows/check-ci.yml'

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ RUN apt-get update && \
5959
sudo \
6060
# These are needed by the premerge pipeline. Pip is used to install
6161
# dependent python packages. File and tzdata are used for tests.
62+
# Having a symlink from python to python3 enables code sharing between
63+
# the Linux and Windows pipelines.
6264
python3-pip \
6365
file \
64-
tzdata && \
66+
tzdata \
67+
python-is-python3 && \
6568
apt-get clean && \
6669
rm -rf /var/lib/apt/lists/*
6770

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ jobs:
260260
- name: Install a current LLVM
261261
if: ${{ matrix.mingw != true }}
262262
run: |
263-
choco install -y llvm --version=19.1.7 --allow-downgrade
263+
choco install -y llvm --version=20.1.8 --allow-downgrade
264264
- name: Install llvm-mingw
265265
if: ${{ matrix.mingw == true }}
266266
run: |
267-
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250114/llvm-mingw-20250114-ucrt-x86_64.zip
267+
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-x86_64.zip
268268
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
269269
del llvm-mingw*.zip
270270
mv llvm-mingw* c:\llvm-mingw

clang/docs/HardwareAssistedAddressSanitizerDesign.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ implement page aliasing.
291291

292292
Related Work
293293
============
294-
* `SPARC ADI`_ implements a similar tool mostly in hardware.
294+
* `SPARC ADI`_ and `Arm MTE`_ implement a similar tool mostly in hardware.
295295
* `Effective and Efficient Memory Protection Using Dynamic Tainting`_ discusses
296296
similar approaches ("lock & key").
297297
* `Watchdog`_ discussed a heavier, but still somewhat similar
@@ -302,6 +302,7 @@ Related Work
302302
.. _Watchdog: https://www.cis.upenn.edu/acg/papers/isca12_watchdog.pdf
303303
.. _Effective and Efficient Memory Protection Using Dynamic Tainting: https://www.cc.gatech.edu/~orso/papers/clause.doudalis.orso.prvulovic.pdf
304304
.. _SPARC ADI: https://lazytyped.blogspot.com/2017/09/getting-started-with-adi.html
305+
.. _Arm MTE: https://developer.arm.com/documentation/108035/0100/Introduction-to-the-Memory-Tagging-Extension
305306
.. _AddressSanitizer paper: https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf
306307
.. _Address Tagging: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/ch12s05s01.html
307308
.. _Linear Address Masking: https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ Bug Fixes to Attribute Support
172172

173173
- ``[[nodiscard]]`` is now respected on Objective-C and Objective-C++ methods.
174174
(#GH141504)
175+
- Using ``[[gnu::cleanup(some_func)]]`` where some_func is annotated with
176+
``[[gnu::error("some error")]]`` now correctly triggers an error. (#GH146520)
175177

176178
Bug Fixes to C++ Support
177179
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -180,6 +182,8 @@ Bug Fixes to C++ Support
180182
- Fix a crash when deleting a pointer to an incomplete array (#GH150359).
181183
- Fix an assertion failure when expression in assumption attribute
182184
(``[[assume(expr)]]``) creates temporary objects.
185+
- Fix the dynamic_cast to final class optimization to correctly handle
186+
casts that are guaranteed to fail (#GH137518).
183187

184188
Bug Fixes to AST Handling
185189
^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)