Skip to content

Commit 62604e7

Browse files
authored
Merge branch 'main' into wctype
2 parents 230c273 + 3b11aaa commit 62604e7

File tree

1,070 files changed

+93796
-46248
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,070 files changed

+93796
-46248
lines changed

.ci/monolithic-linux.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
2121
INSTALL_DIR="${BUILD_DIR}/install"
2222
rm -rf "${BUILD_DIR}"
2323

24-
ccache --zero-stats
25-
26-
if [[ -n "${CLEAR_CACHE:-}" ]]; then
27-
echo "clearing cache"
28-
ccache --clear
29-
fi
24+
sccache --zero-stats
3025

3126
mkdir -p artifacts/reproducers
3227

@@ -36,7 +31,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
3631
function at-exit {
3732
retcode=$?
3833

39-
ccache --print-stats > artifacts/ccache_stats.txt
34+
sccache --show-stats > artifacts/sccache_stats.txt
4035
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
4136
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
4237

@@ -78,7 +73,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7873
-D LLVM_LIT_ARGS="${lit_args}" \
7974
-D LLVM_ENABLE_LLD=ON \
8075
-D CMAKE_CXX_FLAGS=-gmlt \
81-
-D LLVM_CCACHE_BUILD=ON \
76+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
77+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
8278
-D LIBCXX_CXX_ABI=libcxxabi \
8379
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
8480
-D LLDB_ENABLE_PYTHON=ON \

.ci/monolithic-windows.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
2121

2222
rm -rf "${BUILD_DIR}"
2323

24-
if [[ -n "${CLEAR_CACHE:-}" ]]; then
25-
echo "clearing sccache"
26-
rm -rf "$SCCACHE_DIR"
27-
fi
28-
2924
sccache --zero-stats
3025
function at-exit {
3126
retcode=$?

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,21 @@ RUN apt-get update && \
6363
python3-pip \
6464
ccache \
6565
file \
66-
tzdata \
67-
sccache && \
66+
tzdata && \
6867
apt-get clean && \
6968
rm -rf /var/lib/apt/lists/*
7069

70+
# We need sccache for caching. We cannot use the apt repository version because
71+
# it is too old and has bugs related to features we require (particularly GCS
72+
# caching), so we manually install it here.
73+
# TODO(boomanaiden154): We should return to installing this from the apt
74+
# repository once a version containing the necessary bug fixes is available.
75+
RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
76+
echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b /tmp/sccache.tar.gz" | sha256sum -c && \
77+
tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
78+
rm /tmp/sccache.tar.gz && \
79+
chmod +x /usr/local/bin/sccache
80+
7181
ENV LLVM_SYSROOT=$LLVM_SYSROOT
7282
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
7383

.github/workflows/libclang-python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ on:
1010
- 'main'
1111
paths:
1212
- 'clang/bindings/python/**'
13-
- 'clang/test/bindings/python/**'
1413
- 'clang/tools/libclang/**'
14+
- 'clang/CMakeList.txt'
1515
- '.github/workflows/libclang-python-tests.yml'
1616
- '.github/workflows/llvm-project-tests.yml'
1717
pull_request:
1818
paths:
1919
- 'clang/bindings/python/**'
20-
- 'clang/test/bindings/python/**'
2120
- 'clang/tools/libclang/**'
21+
- 'clang/CMakeList.txt'
2222
- '.github/workflows/libclang-python-tests.yml'
2323
- '.github/workflows/llvm-project-tests.yml'
2424

.github/workflows/premerge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- name: Setup ccache
3838
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
3939
with:
40+
variant: "sccache"
4041
max-size: "2000M"
4142
- name: Build and Test
4243
# Mark the job as a success even if the step fails so that people do

clang-tools-extra/README.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ Clang frontend. These tools are kept in a separate "extra" repository to
88
allow lighter weight checkouts of the core Clang codebase.
99

1010
All discussion regarding Clang, Clang-based tools, and code in this repository
11-
should be held using the standard Clang forum:
11+
should be held using the standard Clang forums:
1212
https://discourse.llvm.org/c/clang
13+
https://discourse.llvm.org/c/clang/clang-tidy/71
14+
https://discourse.llvm.org/c/clang/clangd/34
1315

14-
Code review for this tree should take place on the standard Clang patch and
15-
commit lists:
16-
http://lists.llvm.org/mailman/listinfo/cfe-commits
16+
Code review for this tree should take place on Github:
17+
https://github.com/llvm/llvm-project/pulls?q=label%3Aclang-tools-extra
1718

1819
If you find a bug in these tools, please file it in the LLVM bug tracker:
1920
https://github.com/llvm/llvm-project/issues/

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static auto SerializeReferenceLambda = [](const auto &Ref, Object &Object) {
4545

4646
static json::Object
4747
serializeLocation(const Location &Loc,
48-
const std::optional<StringRef> &RepositoryUrl) {
48+
const std::optional<StringRef> RepositoryUrl) {
4949
Object LocationObj = Object();
5050
LocationObj["LineNumber"] = Loc.StartLineNumber;
5151
LocationObj["Filename"] = Loc.Filename;
@@ -169,7 +169,7 @@ static json::Value serializeComment(const CommentInfo &I) {
169169

170170
static void
171171
serializeCommonAttributes(const Info &I, json::Object &Obj,
172-
const std::optional<StringRef> &RepositoryUrl) {
172+
const std::optional<StringRef> RepositoryUrl) {
173173
Obj["Name"] = I.Name;
174174
Obj["USR"] = toHex(toStringRef(I.USR));
175175

@@ -211,9 +211,9 @@ static void serializeReference(const Reference &Ref, Object &ReferenceObj) {
211211
// differently. Only enums, records, and typedefs are handled here.
212212
static void
213213
serializeCommonChildren(const ScopeChildren &Children, json::Object &Obj,
214-
const std::optional<StringRef> &RepositoryUrl) {
215-
static auto SerializeInfo = [&RepositoryUrl](const auto &Info,
216-
Object &Object) {
214+
const std::optional<StringRef> RepositoryUrl) {
215+
static auto SerializeInfo = [RepositoryUrl](const auto &Info,
216+
Object &Object) {
217217
serializeInfo(Info, Object, RepositoryUrl);
218218
};
219219

@@ -304,7 +304,7 @@ static void serializeInfo(const FieldTypeInfo &I, Object &Obj) {
304304
}
305305

306306
static void serializeInfo(const FunctionInfo &F, json::Object &Obj,
307-
const std::optional<StringRef> &RepositoryURL) {
307+
const std::optional<StringRef> RepositoryURL) {
308308
serializeCommonAttributes(F, Obj, RepositoryURL);
309309
Obj["IsStatic"] = F.IsStatic;
310310

@@ -459,7 +459,7 @@ static void serializeInfo(const RecordInfo &I, json::Object &Obj,
459459
}
460460

461461
static void serializeInfo(const VarInfo &I, json::Object &Obj,
462-
const std::optional<StringRef> &RepositoryUrl) {
462+
const std::optional<StringRef> RepositoryUrl) {
463463
serializeCommonAttributes(I, Obj, RepositoryUrl);
464464
Obj["IsStatic"] = I.IsStatic;
465465
auto TypeObj = Object();
@@ -468,15 +468,15 @@ static void serializeInfo(const VarInfo &I, json::Object &Obj,
468468
}
469469

470470
static void serializeInfo(const NamespaceInfo &I, json::Object &Obj,
471-
const std::optional<StringRef> &RepositoryUrl) {
471+
const std::optional<StringRef> RepositoryUrl) {
472472
serializeCommonAttributes(I, Obj, RepositoryUrl);
473473

474474
if (!I.Children.Namespaces.empty())
475475
serializeArray(I.Children.Namespaces, Obj, "Namespaces",
476476
SerializeReferenceLambda);
477477

478-
static auto SerializeInfo = [&RepositoryUrl](const auto &Info,
479-
Object &Object) {
478+
static auto SerializeInfo = [RepositoryUrl](const auto &Info,
479+
Object &Object) {
480480
serializeInfo(Info, Object, RepositoryUrl);
481481
};
482482

0 commit comments

Comments
 (0)