Skip to content

Commit ab33820

Browse files
authored
Merge branch 'main' into llvm_dwarfdump_gdb_index_speedup
2 parents b51c223 + a418fa7 commit ab33820

File tree

1,613 files changed

+84871
-31202
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,613 files changed

+84871
-31202
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: 31 additions & 12 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

@@ -284,6 +278,31 @@ def test_ci(self):
284278
"check-cxx check-cxxabi check-unwind",
285279
)
286280

281+
def test_windows_ci(self):
282+
env_variables = compute_projects.get_env_variables(
283+
[".ci/compute_projects.py"], "Windows"
284+
)
285+
self.assertEqual(
286+
env_variables["projects_to_build"],
287+
"clang;clang-tools-extra;libclc;lld;llvm;mlir;polly",
288+
)
289+
self.assertEqual(
290+
env_variables["project_check_targets"],
291+
"check-clang check-clang-cir check-clang-tools check-lld check-llvm check-mlir check-polly",
292+
)
293+
self.assertEqual(
294+
env_variables["runtimes_to_build"],
295+
"",
296+
)
297+
self.assertEqual(
298+
env_variables["runtimes_check_targets"],
299+
"",
300+
)
301+
self.assertEqual(
302+
env_variables["runtimes_check_targets_needs_reconfig"],
303+
"",
304+
)
305+
287306
def test_lldb(self):
288307
env_variables = compute_projects.get_env_variables(
289308
["lldb/CMakeLists.txt"], "Linux"

.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/libc-fullbuild-tests.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,32 @@ jobs:
2020
include:
2121
- os: ubuntu-24.04
2222
build_type: Debug
23-
ccache-variant: sccache
24-
c_compiler: clang-20
25-
cpp_compiler: clang++-20
23+
c_compiler: clang-22
24+
cpp_compiler: clang++-22
2625
target: x86_64-unknown-linux-llvm
2726
include_scudo: ON
2827
- os: ubuntu-24.04
2928
build_type: Release
30-
ccache-variant: sccache
31-
c_compiler: clang-20
32-
cpp_compiler: clang++-20
29+
c_compiler: clang-22
30+
cpp_compiler: clang++-22
3331
target: x86_64-unknown-linux-llvm
3432
include_scudo: ON
3533
- os: ubuntu-24.04
3634
build_type: MinSizeRel
37-
ccache-variant: sccache
38-
c_compiler: clang-20
39-
cpp_compiler: clang++-20
35+
c_compiler: clang-22
36+
cpp_compiler: clang++-22
4037
target: x86_64-unknown-linux-llvm
4138
include_scudo: ON
42-
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
4339
- os: ubuntu-24.04-arm
4440
build_type: Debug
45-
ccache-variant: ccache
46-
c_compiler: clang-20
47-
cpp_compiler: clang++-20
41+
c_compiler: clang-22
42+
cpp_compiler: clang++-22
4843
target: aarch64-unknown-linux-llvm
4944
include_scudo: ON
5045
- os: ubuntu-24.04
5146
build_type: Debug
52-
ccache-variant: ccache
53-
c_compiler: clang-20
54-
cpp_compiler: clang++-20
47+
c_compiler: clang-22
48+
cpp_compiler: clang++-22
5549
target: x86_64-unknown-uefi-llvm
5650
include_scudo: OFF
5751
# TODO: add back gcc build when it is fixed
@@ -71,7 +65,7 @@ jobs:
7165
with:
7266
max-size: 1G
7367
key: libc_fullbuild_${{ matrix.c_compiler }}
74-
variant: ${{ matrix.ccache-variant }}
68+
variant: sccache
7569

7670
# Notice:
7771
# - MPFR is required by some of the mathlib tests.
@@ -81,7 +75,7 @@ jobs:
8175
run: |
8276
wget https://apt.llvm.org/llvm.sh
8377
chmod +x llvm.sh
84-
sudo ./llvm.sh 20
78+
sudo ./llvm.sh 22
8579
sudo apt-get update
8680
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
8781
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm
@@ -112,8 +106,8 @@ jobs:
112106
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
113107
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
114108
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
115-
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }} \
116-
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }} \
109+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
110+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
117111
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
118112
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
119113
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \

0 commit comments

Comments
 (0)