Skip to content

Commit fcac22e

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:ea20647023f7bb110e8a198485727458684c43c6 into amd-gfx:bd7ba70d3543
Local branch amd-gfx bd7ba70 Merged main:8cdecd4d3aedea7bc5f27d1f69da216100cb2815 into amd-gfx:3efff4af20d0 Remote branch main ea20647 [mlir][ArmSME] NFC: -force-streaming-compatible-sve rename fixup (llvm#93177)
2 parents bd7ba70 + ea20647 commit fcac22e

File tree

235 files changed

+10956
-10607
lines changed

Some content is hidden

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

235 files changed

+10956
-10607
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,22 @@ function compute-projects-to-test() {
8585
done
8686
}
8787

88+
function compute-runtimes-to-test() {
89+
projects=${@}
90+
for project in ${projects}; do
91+
case ${project} in
92+
clang)
93+
for p in libcxx libcxxabi libunwind; do
94+
echo $p
95+
done
96+
;;
97+
*)
98+
# Nothing to do
99+
;;
100+
esac
101+
done
102+
}
103+
88104
function add-dependencies() {
89105
projects=${@}
90106
for project in ${projects}; do
@@ -178,6 +194,15 @@ function check-targets() {
178194
cross-project-tests)
179195
echo "check-cross-project"
180196
;;
197+
libcxx)
198+
echo "check-cxx"
199+
;;
200+
libcxxabi)
201+
echo "check-cxxabi"
202+
;;
203+
libunwind)
204+
echo "check-unwind"
205+
;;
181206
lldb)
182207
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
183208
;;
@@ -207,17 +232,6 @@ if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cma
207232
EOF
208233
fi
209234

210-
# If clang changed.
211-
if echo "$modified_dirs" | grep -q -E "^(clang)$"; then
212-
cat <<EOF
213-
- trigger: "clang-ci"
214-
build:
215-
message: "${buildMessage}"
216-
commit: "${BUILDKITE_COMMIT}"
217-
branch: "${BUILDKITE_BRANCH}"
218-
EOF
219-
fi
220-
221235
# Generic pipeline for projects that have not defined custom steps.
222236
#
223237
# Individual projects should instead define the pre-commit CI tests that suits their
@@ -231,6 +245,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro
231245
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
232246
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
233247

248+
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
249+
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
250+
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
251+
234252
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
235253
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
236254
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
@@ -255,7 +273,7 @@ if [[ "${linux_projects}" != "" ]]; then
255273
CC: 'clang'
256274
CXX: 'clang++'
257275
commands:
258-
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"'
276+
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"'
259277
EOF
260278
fi
261279

.ci/monolithic-linux.sh

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set -o pipefail
1818

1919
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
21+
INSTALL_DIR="${BUILD_DIR}/install"
2122
rm -rf "${BUILD_DIR}"
2223

2324
ccache --zero-stats
@@ -49,8 +50,79 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4950
-D LLVM_ENABLE_LLD=ON \
5051
-D CMAKE_CXX_FLAGS=-gmlt \
5152
-D LLVM_CCACHE_BUILD=ON \
52-
-D MLIR_ENABLE_BINDINGS_PYTHON=ON
53+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
54+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
5355

5456
echo "--- ninja"
5557
# Targets are not escaped as they are passed as separate arguments.
5658
ninja -C "${BUILD_DIR}" -k 0 ${targets}
59+
60+
runtimes="${3}"
61+
runtime_targets="${4}"
62+
63+
# Compiling runtimes with just-built Clang and running their tests
64+
# as an additional testing for Clang.
65+
if [[ "${runtimes}" != "" ]]; then
66+
if [[ "${runtime_targets}" == "" ]]; then
67+
echo "Runtimes to build are specified, but targets are not."
68+
exit 1
69+
fi
70+
71+
echo "--- ninja install-clang"
72+
73+
ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
74+
75+
RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
76+
INSTALL_DIR="${BUILD_DIR}/install"
77+
mkdir -p ${RUNTIMES_BUILD_DIR}
78+
79+
echo "--- cmake runtimes C++03"
80+
81+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
82+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
83+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
84+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
85+
-D LIBCXX_CXX_ABI=libcxxabi \
86+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
87+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
88+
-D LIBCXX_TEST_PARAMS="std=c++03" \
89+
-D LIBCXXABI_TEST_PARAMS="std=c++03"
90+
91+
echo "--- ninja runtimes C++03"
92+
93+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
94+
95+
echo "--- cmake runtimes C++26"
96+
97+
rm -rf "${RUNTIMES_BUILD_DIR}"
98+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
99+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
100+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
101+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
102+
-D LIBCXX_CXX_ABI=libcxxabi \
103+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
104+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
105+
-D LIBCXX_TEST_PARAMS="std=c++26" \
106+
-D LIBCXXABI_TEST_PARAMS="std=c++26"
107+
108+
echo "--- ninja runtimes C++26"
109+
110+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
111+
112+
echo "--- cmake runtimes clang modules"
113+
114+
rm -rf "${RUNTIMES_BUILD_DIR}"
115+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
116+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
117+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
118+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
119+
-D LIBCXX_CXX_ABI=libcxxabi \
120+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
121+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
122+
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
123+
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang"
124+
125+
echo "--- ninja runtimes clang modules"
126+
127+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
128+
fi

clang-tools-extra/clang-tidy/misc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ add_clang_library(clangTidyMiscModule
5252
genconfusable
5353
ClangDriverOptions
5454
)
55-
set_target_properties(clangTidyMiscModule PROPERTIES FOLDER "Clang Tools Extra/Libraries")
5655

5756
clang_target_link_libraries(clangTidyMiscModule
5857
PRIVATE

clang-tools-extra/clangd/unittests/ClangdTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ TEST(ClangdServerTest, SearchLibDir) {
392392
ErrorCheckingCallbacks DiagConsumer;
393393
MockCompilationDatabase CDB;
394394
CDB.ExtraClangFlags.insert(CDB.ExtraClangFlags.end(),
395-
{"-xc++", "-target", "x86_64-linux-unknown",
395+
{"-xc++", "--target=x86_64-unknown-linux-gnu",
396396
"-m64", "--gcc-toolchain=/randomusr",
397397
"-stdlib=libstdc++"});
398398
ClangdServer Server(CDB, FS, ClangdServer::optsForTest(), &DiagConsumer);

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,13 +1421,21 @@ the configuration (without a prefix: ``Auto``).
14211421

14221422
.. code-block:: c++
14231423

1424-
true:
14251424
#define A \
14261425
int aaaa; \
14271426
int b; \
14281427
int dddddddddd;
14291428

1430-
false:
1429+
* ``ENAS_LeftWithLastLine`` (in configuration: ``LeftWithLastLine``)
1430+
Align escaped newlines as far left as possible, using the last line of
1431+
the preprocessor directive as the reference if it's the longest.
1432+
1433+
.. code-block:: c++
1434+
1435+
#define A \
1436+
int aaaa; \
1437+
int b; \
1438+
int dddddddddd;
14311439

14321440
* ``ENAS_Right`` (in configuration: ``Right``)
14331441
Align escaped newlines in the right-most column.

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ Bug Fixes to C++ Support
801801
packs. (#GH93076)
802802
- Fixed a regression introduced in Clang 18 causing a static function overloading a non-static function
803803
with the same parameters not to be diagnosed. (Fixes #GH93456).
804+
- Clang now diagnoses unexpanded parameter packs in attributes. (Fixes #GH93269).
804805

805806
Bug Fixes to AST Handling
806807
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -963,9 +964,10 @@ clang-format
963964
``BreakTemplateDeclarations``.
964965
- ``AlwaysBreakAfterReturnType`` is deprecated and renamed to
965966
``BreakAfterReturnType``.
966-
- Handles Java ``switch`` expressions.
967+
- Handles Java switch expressions.
967968
- Adds ``AllowShortCaseExpressionOnASingleLine`` option.
968969
- Adds ``AlignCaseArrows`` suboption to ``AlignConsecutiveShortCaseStatements``.
970+
- Adds ``LeftWithLastLine`` suboption to ``AlignEscapedNewlines``.
969971

970972
libclang
971973
--------

clang/include/clang/Format/Format.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,15 +480,21 @@ struct FormatStyle {
480480
ENAS_DontAlign,
481481
/// Align escaped newlines as far left as possible.
482482
/// \code
483-
/// true:
484483
/// #define A \
485484
/// int aaaa; \
486485
/// int b; \
487486
/// int dddddddddd;
488-
///
489-
/// false:
490487
/// \endcode
491488
ENAS_Left,
489+
/// Align escaped newlines as far left as possible, using the last line of
490+
/// the preprocessor directive as the reference if it's the longest.
491+
/// \code
492+
/// #define A \
493+
/// int aaaa; \
494+
/// int b; \
495+
/// int dddddddddd;
496+
/// \endcode
497+
ENAS_LeftWithLastLine,
492498
/// Align escaped newlines in the right-most column.
493499
/// \code
494500
/// #define A \

0 commit comments

Comments
 (0)