Skip to content

Commit e341545

Browse files
authored
Merge branch 'main' into 93335-clang-tidy-misc-include-cleaner-false-positives
2 parents e467b03 + acf6721 commit e341545

File tree

9,392 files changed

+419633
-179091
lines changed

Some content is hidden

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

9,392 files changed

+419633
-179091
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

5555
function compute-projects-to-test() {
56+
isForWindows=$1
57+
shift
5658
projects=${@}
5759
for project in ${projects}; do
5860
echo "${project}"
@@ -63,20 +65,43 @@ function compute-projects-to-test() {
6365
done
6466
;;
6567
llvm)
66-
for p in bolt clang clang-tools-extra flang lld lldb mlir polly; do
68+
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
6769
echo $p
6870
done
71+
# Flang is not stable in Windows CI at the moment
72+
if [[ $isForWindows == 0 ]]; then
73+
echo flang
74+
fi
6975
;;
7076
clang)
71-
for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
77+
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
7278
echo $p
7379
done
7480
;;
7581
clang-tools-extra)
7682
echo libc
7783
;;
7884
mlir)
79-
echo flang
85+
# Flang is not stable in Windows CI at the moment
86+
if [[ $isForWindows == 0 ]]; then
87+
echo flang
88+
fi
89+
;;
90+
*)
91+
# Nothing to do
92+
;;
93+
esac
94+
done
95+
}
96+
97+
function compute-runtimes-to-test() {
98+
projects=${@}
99+
for project in ${projects}; do
100+
case ${project} in
101+
clang)
102+
for p in libcxx libcxxabi libunwind; do
103+
echo $p
104+
done
80105
;;
81106
*)
82107
# Nothing to do
@@ -128,7 +153,6 @@ function exclude-linux() {
128153
for project in ${projects}; do
129154
case ${project} in
130155
cross-project-tests) ;; # tests failing
131-
lldb) ;; # tests failing
132156
openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
133157
*)
134158
echo "${project}"
@@ -145,7 +169,7 @@ function exclude-windows() {
145169
compiler-rt) ;; # tests taking too long
146170
openmp) ;; # TODO: having trouble with the Perl installation
147171
libc) ;; # no Windows support
148-
lldb) ;; # tests failing
172+
lldb) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
149173
bolt) ;; # tests are not supported yet
150174
*)
151175
echo "${project}"
@@ -178,8 +202,17 @@ function check-targets() {
178202
cross-project-tests)
179203
echo "check-cross-project"
180204
;;
205+
libcxx)
206+
echo "check-cxx"
207+
;;
208+
libcxxabi)
209+
echo "check-cxxabi"
210+
;;
211+
libunwind)
212+
echo "check-unwind"
213+
;;
181214
lldb)
182-
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
215+
echo "check-lldb"
183216
;;
184217
pstl)
185218
echo "check-all"
@@ -207,17 +240,6 @@ if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cma
207240
EOF
208241
fi
209242

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-
221243
# Generic pipeline for projects that have not defined custom steps.
222244
#
223245
# Individual projects should instead define the pre-commit CI tests that suits their
@@ -227,11 +249,15 @@ fi
227249
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
228250
modified_projects="$(keep-modified-projects ${all_projects})"
229251

230-
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))
252+
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
231253
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
232254
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
233255

234-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
256+
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
257+
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
258+
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
259+
260+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
235261
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
236262
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
237263

@@ -255,7 +281,7 @@ if [[ "${linux_projects}" != "" ]]; then
255281
CC: 'clang'
256282
CXX: 'clang++'
257283
commands:
258-
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"'
284+
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"'
259285
EOF
260286
fi
261287

.ci/monolithic-linux.sh

Lines changed: 74 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
@@ -38,6 +39,7 @@ targets="${2}"
3839

3940
echo "--- cmake"
4041
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
42+
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
4143
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4244
-D LLVM_ENABLE_PROJECTS="${projects}" \
4345
-G Ninja \
@@ -49,8 +51,79 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4951
-D LLVM_ENABLE_LLD=ON \
5052
-D CMAKE_CXX_FLAGS=-gmlt \
5153
-D LLVM_CCACHE_BUILD=ON \
52-
-D MLIR_ENABLE_BINDINGS_PYTHON=ON
54+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
55+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
5356

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

.ci/monolithic-windows.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
4444
# see https://github.com/llvm/llvm-project/pull/82393 and
4545
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
4646
# for further information.
47+
# We limit the number of parallel compile jobs to 24 control memory
48+
# consumption and improve build reliability.
4749
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4850
-D LLVM_ENABLE_PROJECTS="${projects}" \
4951
-G Ninja \
@@ -58,7 +60,9 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
5860
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
5961
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
6062
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
61-
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
63+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
64+
-D LLVM_PARALLEL_COMPILE_JOBS=16 \
65+
-D LLVM_PARALLEL_LINK_JOBS=4
6266

6367
echo "--- ninja"
6468
# Targets are not escaped as they are passed as separate arguments.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ clang/test/AST/Interp/ @tbaederr
132132
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci
133133

134134
# Bazel build system.
135-
/utils/bazel/ @rupprecht
135+
/utils/bazel/ @rupprecht @keith
136136

137137
# InstallAPI and TextAPI
138138
/llvm/**/TextAPI/ @cyndyishida

.github/new-prs-labeler.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ llvm-lit:
5454
- llvm/utils/lit/**/*
5555

5656
PGO:
57+
- llvm/**/ProfileData/**/*
58+
- llvm/**/SampleProfile*
59+
- llvm/**/CodeGen/MIRSampleProfile*
5760
- llvm/lib/Transforms/Instrumentation/CGProfile.cpp
5861
- llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
5962
- llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -62,9 +65,9 @@ PGO:
6265
- llvm/lib/Transforms/Instrumentation/ValueProfile*
6366
- llvm/test/Instrumentation/InstrProfiling/**/*
6467
- llvm/test/Transforms/PGOProfile/**/*
68+
- llvm/test/Transforms/SampleProfile/**/*
6569
- llvm/**/llvm-profdata/**/*
6670
- llvm/**/llvm-profgen/**/*
67-
- llvm/unittests/ProfileData/**/*
6871

6972
vectorization:
7073
- llvm/lib/Transforms/Vectorize/**/*
@@ -239,7 +242,7 @@ mlir:dlti:
239242
- mlir/**/DLTI/**
240243

241244
mlir:emitc:
242-
- mlir/**/EmitC/**
245+
- mlir/**/*EmitC*/**
243246
- mlir/lib/Target/Cpp/**
244247

245248
mlir:func:
@@ -306,7 +309,7 @@ mlir:tensor:
306309
- mlir/**/Tensor/**
307310

308311
mlir:tosa:
309-
- mlir/**/Tosa/**
312+
- mlir/**/*Tosa*/**
310313

311314
mlir:ub:
312315
- mlir/**/UB/**
@@ -714,6 +717,16 @@ backend:AMDGPU:
714717
- '**/*amdgpu*/**'
715718
- '**/*AMDGPU*/**'
716719

720+
backend:NVPTX:
721+
- 'llvm/**/*nvvm*'
722+
- 'llvm/**/*NVVM*'
723+
- 'llvm/**/*nvptx*'
724+
- 'llvm/**/*NVPTX*'
725+
- 'llvm/**/*nvvm*/**'
726+
- 'llvm/**/*NVVM*/**'
727+
- 'llvm/**/*nvptx*/**'
728+
- 'llvm/**/*NVPTX*/**'
729+
717730
backend:RISC-V:
718731
- clang/**/*riscv*
719732
- clang/**/*RISCV*
@@ -746,6 +759,8 @@ backend:ARM:
746759
- clang/lib/CodeGen/Targets/ARM.cpp
747760
- clang/include/clang/Basic/BuiltinsARM*
748761
- llvm/test/MC/DisasemblerARM/**
762+
- clang/include/clang/Sema/SemaARM.h
763+
- clang/lib/Sema/SemaARM.cpp
749764

750765
backend:AArch64:
751766
- llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -757,6 +772,8 @@ backend:AArch64:
757772
- clang/lib/CodeGen/Targets/AArch64.cpp
758773
- clang/include/clang/Basic/BuiltinsAArch64*
759774
- llvm/test/MC/Disassembler/AArch64/**
775+
- clang/include/clang/Sema/SemaARM.h
776+
- clang/lib/Sema/SemaARM.cpp
760777

761778
backend:loongarch:
762779
- llvm/include/llvm/IR/IntrinsicsLoongArch.td
@@ -767,6 +784,8 @@ backend:loongarch:
767784
- clang/lib/Driver/ToolChains/Arch/LoongArch.*
768785
- clang/lib/CodeGen/Targets/LoongArch.cpp
769786
- clang/include/clang/Basic/BuiltinsLoongArch*
787+
- clang/include/clang/Sema/SemaLoongArch.h
788+
- clang/lib/Sema/SemaLoongArch.cpp
770789

771790
backend:MSP430:
772791
- llvm/include/llvm/IR/IntrinsicsMSP430.td
@@ -814,6 +833,8 @@ backend:WebAssembly:
814833
- llvm/unittests/Target/WebAssembly/**
815834
- llvm/test/DebugInfo/WebAssembly/**
816835
- llvm/test/MC/WebAssembly/**
836+
- clang/include/clang/Sema/SemaWasm.h
837+
- clang/lib/Sema/SemaLoongWasm.cpp
817838

818839
backend:X86:
819840
- llvm/include/llvm/IR/IntrinsicsX86.td
@@ -833,6 +854,8 @@ backend:X86:
833854
- llvm/include/llvm/TargetParser/X86*
834855
- llvm/lib/TargetParser/X86*
835856
- llvm/utils/TableGen/X86*
857+
- clang/include/clang/Sema/SemaX86.h
858+
- clang/lib/Sema/SemaX86.cpp
836859

837860
backend:PowerPC:
838861
- llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC*
@@ -857,6 +880,8 @@ backend:PowerPC:
857880
- clang/lib/Driver/ToolChains/AIX*
858881
- clang/lib/Driver/ToolChains/Arch/PPC.*
859882
- clang/test/CodeGen/PowerPC/**
883+
- clang/include/clang/Sema/SemaPPC.h
884+
- clang/lib/Sema/SemaPPC.cpp
860885

861886
backend:SystemZ:
862887
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
@@ -877,6 +902,8 @@ backend:SystemZ:
877902
- clang/lib/Driver/ToolChains/ZOS*
878903
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
879904
- clang/test/CodeGen/SystemZ/**
905+
- clang/include/clang/Sema/SemaSystemZ.h
906+
- clang/lib/Sema/SemaSystemZ.cpp
880907

881908
third-party:unittests:
882909
- third-party/unittests/**

0 commit comments

Comments
 (0)