Skip to content

Commit 50638fc

Browse files
authored
Merge branch 'main' into main
2 parents 8521e62 + eb74d8e commit 50638fc

File tree

793 files changed

+41190
-7978
lines changed

Some content is hidden

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

793 files changed

+41190
-7978
lines changed

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,21 @@ jobs:
6464
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
6565

6666
- name: Run baseline
67+
env:
68+
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
6769
run: |
6870
source .venv/bin/activate && cd repo
6971
python -m pip install -r libcxx/utils/requirements.txt
7072
baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
71-
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
73+
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed "$BENCHMARKS"
7274
./libcxx/utils/consolidate-benchmarks build/baseline | tee baseline.lnt
7375
7476
- name: Run candidate
77+
env:
78+
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
7579
run: |
7680
source .venv/bin/activate && cd repo
77-
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
81+
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed "$BENCHMARKS"
7882
./libcxx/utils/consolidate-benchmarks build/candidate | tee candidate.lnt
7983
8084
- name: Compare baseline and candidate runs

.github/workflows/premerge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ jobs:
193193
uses: llvm/actions/install-ninja@main
194194
- name: Build and Test
195195
run: |
196-
source <(git diff --name-only HEAD~2..HEAD | python3 .ci/compute_projects.py)
196+
source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py)
197197
198198
if [[ "${projects_to_build}" == "" ]]; then
199199
echo "No projects to build"

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
ref: ${{ steps.vars.outputs.ref }}
5959
upload: ${{ steps.vars.outputs.upload }}
6060
target-cmake-flags: ${{ steps.vars.outputs.target-cmake-flags }}
61-
ccache: ${{ steps.vars.outputs.ccache }}
6261
build-flang: ${{ steps.vars.outputs.build-flang }}
6362
release-binary-basename: ${{ steps.vars.outputs.release-binary-basename }}
6463
release-binary-filename: ${{ steps.vars.outputs.release-binary-filename }}
@@ -123,13 +122,6 @@ jobs:
123122
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
124123
125124
target="$RUNNER_OS-$RUNNER_ARCH"
126-
# The hendrikmuhs/ccache-action action does not support installing sccache
127-
# on arm64 Linux.
128-
if [ "$target" = "Linux-ARM64" ]; then
129-
echo ccache=ccache >> $GITHUB_OUTPUT
130-
else
131-
echo ccache=sccache >> $GITHUB_OUTPUT
132-
fi
133125
134126
# The macOS builds try to cross compile some libraries so we need to
135127
# add extra CMake args to disable them.
@@ -222,15 +214,12 @@ jobs:
222214
- name: Configure
223215
id: build
224216
shell: bash
225-
env:
226-
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
227217
run: |
228218
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
229219
# so we need to set some extra cmake flags to disable this.
230220
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
231221
${{ needs.prepare.outputs.target-cmake-flags }} \
232222
-C clang/cmake/caches/Release.cmake \
233-
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
234223
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
235224
236225
- name: Build

.github/workflows/release-documentation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
description: 'Upload documentation'
2626
required: false
2727
type: boolean
28+
secrets:
29+
WWW_RELEASES_TOKEN:
30+
description: "Secret used to create a PR with the documentation changes."
31+
required: false
2832

2933
jobs:
3034
release-documentation:

.github/workflows/release-tasks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
with:
5555
release-version: ${{ needs.validate-tag.outputs.release-version }}
5656
upload: true
57+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
58+
secrets:
59+
WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
5760

5861
release-doxygen:
5962
name: Build and Upload Release Doxygen

clang-tools-extra/clang-doc/assets/clang-doc-mustache.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ body, html {
396396

397397
.sidebar {
398398
width: 250px;
399-
top: 0;
399+
top: 60px;
400400
left: 0;
401401
height: 100%;
402402
position: fixed;

clang/bindings/python/clang/cindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3015,7 +3015,7 @@ class _CXUnsavedFile(Structure):
30153015

30163016

30173017
# Functions calls through the python interface are rather slow. Fortunately,
3018-
# for most symboles, we do not need to perform a function call. Their spelling
3018+
# for most symbols, we do not need to perform a function call. Their spelling
30193019
# never changes and is consequently provided by this spelling cache.
30203020
SPELLING_CACHE = {
30213021
# 0: CompletionChunk.Kind("Optional"),

clang/cmake/caches/Release.cmake

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ set(LLVM_RELEASE_ENABLE_LTO THIN CACHE STRING "")
4444
set(LLVM_RELEASE_ENABLE_PGO ON CACHE BOOL "")
4545
set(LLVM_RELEASE_ENABLE_RUNTIMES ${DEFAULT_RUNTIMES} CACHE STRING "")
4646
set(LLVM_RELEASE_ENABLE_PROJECTS ${DEFAULT_PROJECTS} CACHE STRING "")
47+
48+
# This option enables linking stage2 clang statically with the runtimes
49+
# (libc++ and compiler-rt) from stage1. In theory this will give the
50+
# binaries better performance and make them more portable. However,
51+
# this configuration is not well tested and causes build failures with
52+
# the flang-rt tests cases, since the -stclib=libc++ flag does not
53+
# get propagated to the runtimes build. There is also a separate
54+
# issue on Darwin where clang will use the local libc++ headers, but
55+
# link with system libc++ which can cause some incompatibilities.
56+
# See https://github.com/llvm/llvm-project/issues/77653
57+
# Because of these problems, this option will default to OFF.
58+
set(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES OFF CACHE BOOL "")
59+
4760
# Note we don't need to add install here, since it is one of the pre-defined
4861
# steps.
4962
set(LLVM_RELEASE_FINAL_STAGE_TARGETS "clang;package;check-all;check-llvm;check-clang" CACHE STRING "")
@@ -55,8 +68,12 @@ set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
5568

5669
set(STAGE1_PROJECTS "clang")
5770

71+
# Need to build compiler-rt in order to use PGO for later stages.
72+
set(STAGE1_RUNTIMES "compiler-rt")
5873
# Build all runtimes so we can statically link them into the stage2 compiler.
59-
set(STAGE1_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind")
74+
if(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES)
75+
list(APPEND STAGE1_RUNTIMES "libcxx;libcxxabi;libunwind")
76+
endif()
6077

6178
if (LLVM_RELEASE_ENABLE_PGO)
6279
list(APPEND STAGE1_PROJECTS "lld")
@@ -118,21 +135,25 @@ set_instrument_and_final_stage_var(LLVM_ENABLE_LTO "${LLVM_RELEASE_ENABLE_LTO}"
118135
if (LLVM_RELEASE_ENABLE_LTO)
119136
set_instrument_and_final_stage_var(LLVM_ENABLE_LLD "ON" BOOL)
120137
endif()
121-
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
122-
set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
123-
set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
124-
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
125-
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
138+
if(LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES)
139+
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL)
140+
set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL)
141+
set(RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind")
142+
if(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
143+
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc")
144+
endif()
126145
endif()
127146

128147
# Set flags for bolt
129148
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
130149
set(RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -Wl,--emit-relocs,-znow")
131150
endif()
132151

133-
set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
134-
set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
135-
set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
152+
if (RELEASE_LINKER_FLAGS)
153+
set_instrument_and_final_stage_var(CMAKE_EXE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
154+
set_instrument_and_final_stage_var(CMAKE_SHARED_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
155+
set_instrument_and_final_stage_var(CMAKE_MODULE_LINKER_FLAGS ${RELEASE_LINKER_FLAGS} STRING)
156+
endif()
136157

137158
# Final Stage Config (stage2)
138159
set_final_stage_var(LLVM_ENABLE_RUNTIMES "${LLVM_RELEASE_ENABLE_RUNTIMES}" STRING)

clang/docs/AllocToken.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ The default mode to calculate tokens is:
3737
pointers.
3838

3939
Other token ID assignment modes are supported, but they may be subject to
40-
change or removal. These may (experimentally) be selected with ``-mllvm
41-
-alloc-token-mode=<mode>``:
40+
change or removal. These may (experimentally) be selected with ``-Xclang
41+
-falloc-token-mode=<mode>``:
4242

4343
* ``typehash``: This mode assigns a token ID based on the hash of the allocated
4444
type's name.

clang/include/clang/AST/StmtOpenACC.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,17 @@ class OpenACCAtomicConstruct final
815815
Stmt *getAssociatedStmt() {
816816
return OpenACCAssociatedStmtConstruct::getAssociatedStmt();
817817
}
818+
819+
// A struct to represent a broken-down version of the associated statement,
820+
// providing the information specified in OpenACC3.3 Section 2.12.
821+
struct StmtInfo {
822+
const Expr *V;
823+
const Expr *X;
824+
// TODO: OpenACC: We should expand this as we're implementing the other
825+
// atomic construct kinds.
826+
};
827+
828+
const StmtInfo getAssociatedStmtInfo() const;
818829
};
819830

820831
} // namespace clang

0 commit comments

Comments
 (0)