Skip to content

Commit 36b9cc7

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into l0v2-tests
2 parents e857c5b + 6309d6d commit 36b9cc7

File tree

7,709 files changed

+468277
-345075
lines changed

Some content is hidden

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

7,709 files changed

+468277
-345075
lines changed

.ci/all_requirements.txt

Lines changed: 583 additions & 0 deletions
Large diffs are not rendered by default.

.ci/metrics/metrics.py

Lines changed: 545 additions & 0 deletions
Large diffs are not rendered by default.

.ci/monolithic-linux.sh

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#!/usr/bin/env bash
2+
#===----------------------------------------------------------------------===##
3+
#
4+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See https://llvm.org/LICENSE.txt for license information.
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
#
8+
#===----------------------------------------------------------------------===##
9+
10+
#
11+
# This script performs a monolithic build of the monorepo and runs the tests of
12+
# most projects on Linux. This should be replaced by per-project scripts that
13+
# run only the relevant tests.
14+
#
15+
16+
source .ci/utils.sh
17+
18+
INSTALL_DIR="${BUILD_DIR}/install"
19+
20+
mkdir -p artifacts/reproducers
21+
22+
# Make sure any clang reproducers will end up as artifacts
23+
export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
24+
25+
projects="${1}"
26+
targets="${2}"
27+
runtimes="${3}"
28+
runtime_targets="${4}"
29+
runtime_targets_needs_reconfig="${5}"
30+
enable_cir="${6}"
31+
32+
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct"
33+
34+
start-group "CMake"
35+
36+
# Set the system llvm-symbolizer as preferred.
37+
export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
38+
[[ ! -f "${LLVM_SYMBOLIZER_PATH}" ]] && echo "llvm-symbolizer not found!"
39+
40+
# Set up all runtimes either way. libcxx is a dependency of LLDB.
41+
# It will not be built unless it is used.
42+
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
43+
-D LLVM_ENABLE_PROJECTS="${projects}" \
44+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
45+
-G Ninja \
46+
-D CMAKE_PREFIX_PATH="${HOME}/.local" \
47+
-D CMAKE_BUILD_TYPE=Release \
48+
-D CLANG_ENABLE_CIR=${enable_cir} \
49+
-D LLVM_ENABLE_ASSERTIONS=ON \
50+
-D LLVM_BUILD_EXAMPLES=ON \
51+
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
52+
-D LLVM_LIT_ARGS="${lit_args}" \
53+
-D LLVM_ENABLE_LLD=ON \
54+
-D CMAKE_CXX_FLAGS=-gmlt \
55+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
56+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
57+
-D LIBCXX_CXX_ABI=libcxxabi \
58+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
59+
-D LLDB_ENABLE_PYTHON=ON \
60+
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
61+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
62+
-D CMAKE_EXE_LINKER_FLAGS="-no-pie" \
63+
-D LLVM_ENABLE_WERROR=ON
64+
65+
start-group "ninja"
66+
67+
if [[ -n "${targets}" ]]; then
68+
# Targets are not escaped as they are passed as separate arguments.
69+
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
70+
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
71+
fi
72+
73+
if [[ -n "${runtime_targets}" ]]; then
74+
start-group "ninja Runtimes"
75+
76+
ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log
77+
cp ${BUILD_DIR}/.ninja_log ninja_runtimes.ninja_log
78+
fi
79+
80+
# Compiling runtimes with just-built Clang and running their tests
81+
# as an additional testing for Clang.
82+
if [[ -n "${runtime_targets_needs_reconfig}" ]]; then
83+
start-group "CMake Runtimes C++26"
84+
85+
cmake \
86+
-D LIBCXX_TEST_PARAMS="std=c++26" \
87+
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
88+
"${BUILD_DIR}"
89+
90+
start-group "ninja Runtimes C++26"
91+
92+
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
93+
|& tee ninja_runtimes_needs_reconfig1.log
94+
cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconig.ninja_log
95+
96+
start-group "CMake Runtimes Clang Modules"
97+
98+
cmake \
99+
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
100+
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
101+
"${BUILD_DIR}"
102+
103+
start-group "ninja Runtimes Clang Modules"
104+
105+
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
106+
|& tee ninja_runtimes_needs_reconfig2.log
107+
cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconfig2.ninja_log
108+
fi

.ci/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
junitparser==3.2.0
2+
google-cloud-storage==3.3.0
3+
PyGithub==2.8.1

.ci/utils.sh

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/env bash
2+
#===----------------------------------------------------------------------===##
3+
#
4+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See https://llvm.org/LICENSE.txt for license information.
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
#
8+
#===----------------------------------------------------------------------===##
9+
10+
# This script performs some setup and contains some utilities used for in the
11+
# monolithic-linux.sh and monolithic-windows.sh scripts.
12+
13+
set -ex
14+
set -o pipefail
15+
16+
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
17+
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
18+
19+
rm -rf "${BUILD_DIR}"
20+
21+
sccache --zero-stats
22+
23+
function at-exit {
24+
retcode=$?
25+
26+
mkdir -p artifacts
27+
sccache --show-stats
28+
sccache --show-stats >> artifacts/sccache_stats.txt
29+
cp "${MONOREPO_ROOT}"/*.ninja_log artifacts/ || :
30+
cp "${MONOREPO_ROOT}"/*.log artifacts/ || :
31+
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
32+
33+
# If building fails there will be no results files.
34+
shopt -s nullglob
35+
36+
if [[ -n "$GITHUB_ACTIONS" ]]; then
37+
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
38+
$retcode "${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log \
39+
>> $GITHUB_STEP_SUMMARY
40+
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \
41+
$(git rev-parse HEAD~1) $retcode "${GITHUB_TOKEN}" \
42+
$GITHUB_PR_NUMBER "${BUILD_DIR}"/test-results.*.xml \
43+
"${MONOREPO_ROOT}"/ninja*.log
44+
fi
45+
46+
if [[ "$retcode" != "0" ]]; then
47+
if [[ -n "$GITHUB_ACTIONS" ]]; then
48+
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
49+
$(git rev-parse HEAD~1) $GITHUB_RUN_NUMBER \
50+
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
51+
else
52+
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
53+
$(git rev-parse HEAD) $BUILDBOT_BUILDNUMBER \
54+
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
55+
fi
56+
fi
57+
}
58+
trap at-exit EXIT
59+
60+
function start-group {
61+
groupname=$1
62+
if [[ -n "$GITHUB_ACTIONS" ]]; then
63+
echo "::endgroup"
64+
echo "::group::$groupname"
65+
elif [[ -n "$POSTCOMMIT_CI" ]]; then
66+
echo "@@@$STEP@@@"
67+
else
68+
echo "Starting $groupname"
69+
fi
70+
}
71+
72+
export PIP_BREAK_SYSTEM_PACKAGES=1
73+
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
74+
75+
# The ARM64 builders run on AWS and don't have access to the GCS cache.
76+
if [[ -n "$GITHUB_ACTIONS" ]] && [[ "$RUNNER_ARCH" != "ARM64" ]]; then
77+
python .ci/cache_lit_timing_files.py download
78+
fi

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
HeaderFilterRegex: ''
12
Checks: >
23
-*,
34
clang-diagnostic-*,

.git-blame-ignore-revs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,12 @@ a3a007ad5fa20abc90ead4e1030b481bf109b4cf
143143
b7e332d3f59f567b1999fbcc660d7837cba8e406
144144
6056f942abe83b05406df8b04e95ec37a3d160b5
145145
906295b8a31c8dac5aa845864c0bca9f02f86184
146+
147+
# [clang-tidy][NFC] Remove trailing whitespaces in documentation
148+
8f2b167de4a1268160c06512d08863a9e8f43290
149+
150+
# [clang-tidy][NFC] Enforce 80 characters limit in docs
151+
5edf70c41c5d69f3751b4199f642f4585599dade
152+
c73870dbe89a8219130e21a0b3f13df76d299352
153+
74c40293c309dbd142bf1f0ebfbfde6be8d30655
154+
a7ba8dcad76476478100c228a31d9c48391b1e03

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.github/CODEOWNERS merge=ours
2+
clang/bindings/python/.git_archival.txt export-subst
23

34
libcxx/src/**/*.cpp merge=libcxx-reformat
45
libcxx/include/**/*.h merge=libcxx-reformat

0 commit comments

Comments
 (0)