Skip to content

Commit b7f2716

Browse files
author
joaosaffran
committed
Merge branch 'main' into users/joaosaffran/123147
2 parents ef1ce8a + 55015e1 commit b7f2716

File tree

608 files changed

+14364
-5991
lines changed

Some content is hidden

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

608 files changed

+14364
-5991
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
build_type: [Debug, Release, MinSizeRel]
1819
include:
1920
- os: ubuntu-24.04
2021
ccache-variant: sccache
@@ -68,7 +69,7 @@ jobs:
6869
cmake -B ${{ steps.strings.outputs.build-output-dir }}
6970
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7071
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
71-
-DCMAKE_BUILD_TYPE=MinSizeRel
72+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
7273
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7374
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7475
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}

.github/workflows/libc-overlay-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
1717
fail-fast: false
1818
matrix:
19+
build_type: [Debug, Release, MinSizeRel]
1920
include:
2021
# TODO: add linux gcc when it is fixed
2122
- os: ubuntu-24.04
@@ -95,7 +96,7 @@ jobs:
9596
cmake -B ${{ steps.strings.outputs.build-output-dir }}
9697
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
9798
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
98-
-DCMAKE_BUILD_TYPE=MinSizeRel
99+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
99100
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
100101
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
101102
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW

bolt/lib/RuntimeLibs/RuntimeLibrary.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "llvm/Object/Archive.h"
1919
#include "llvm/Object/ObjectFile.h"
2020
#include "llvm/Support/Path.h"
21+
#include "llvm/Support/Program.h"
2122

2223
#define DEBUG_TYPE "bolt-rtlib"
2324

@@ -38,6 +39,23 @@ std::string RuntimeLibrary::getLibPathByToolPath(StringRef ToolPath,
3839
llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX);
3940
}
4041
llvm::sys::path::append(LibPath, LibFileName);
42+
if (!llvm::sys::fs::exists(LibPath)) {
43+
// If it is a symlink, check the directory that the symlink points to.
44+
if (llvm::sys::fs::is_symlink_file(ToolPath)) {
45+
SmallString<256> RealPath;
46+
llvm::sys::fs::real_path(ToolPath, RealPath);
47+
if (llvm::ErrorOr<std::string> P =
48+
llvm::sys::findProgramByName(RealPath)) {
49+
outs() << "BOLT-INFO: library not found: " << LibPath << "\n"
50+
<< "BOLT-INFO: " << ToolPath << " is a symlink; will look up "
51+
<< LibFileName
52+
<< " at the target directory that the symlink points to\n";
53+
return getLibPath(*P, LibFileName);
54+
}
55+
}
56+
errs() << "BOLT-ERROR: library not found: " << LibPath << "\n";
57+
exit(1);
58+
}
4159
return std::string(LibPath);
4260
}
4361

clang/cmake/caches/Fuchsia-stage2-instrumented.cmake

Lines changed: 0 additions & 44 deletions
This file was deleted.

clang/cmake/caches/Fuchsia.cmake

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,6 @@ else()
126126
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
127127
set(LIBCXX_HARDENING_MODE "none" CACHE STRING "")
128128
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
129-
set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
130-
set(COMPILER_RT_BUILD_PROFILE ON CACHE BOOL "")
131-
set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "")
132-
set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
133-
set(COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
134-
set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
135-
set(SANITIZER_CXX_ABI "libc++" CACHE STRING "")
136-
set(SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
137-
set(SANITIZER_TEST_CXX "libc++" CACHE STRING "")
138-
set(SANITIZER_TEST_CXX_INTREE ON CACHE BOOL "")
139129
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
140130
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "")
141131
endif()
@@ -174,29 +164,34 @@ endif()
174164

175165
set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
176166
set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
177-
set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED ON CACHE BOOL "")
178167

179168
set(_FUCHSIA_BOOTSTRAP_TARGETS
180-
generate-profdata
181-
stage2
182-
stage2-toolchain-distribution
183-
stage2-install-toolchain-distribution
184-
stage2-install-toolchain-distribution-stripped
185-
stage2-install-toolchain-distribution-toolchain
186-
stage2-check-all
187-
stage2-check-lld
188-
stage2-check-llvm
189-
stage2-check-clang
190-
stage2-test-suite)
169+
check-all
170+
check-clang
171+
check-lld
172+
check-llvm
173+
check-polly
174+
llvm-config
175+
clang-test-depends
176+
lld-test-depends
177+
llvm-test-depends
178+
test-suite
179+
test-depends
180+
toolchain-distribution
181+
install-toolchain-distribution
182+
install-toolchain-distribution-stripped
183+
install-toolchain-distribution-toolchain
184+
clang)
191185

192186
if(FUCHSIA_ENABLE_LLDB)
193187
list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb)
194188
list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS
195-
stage2-check-lldb
196-
stage2-debugger-distribution
197-
stage2-install-debugger-distribution
198-
stage2-install-debugger-distribution-stripped
199-
stage2-install-debugger-distribution-toolchain)
189+
check-lldb
190+
lldb-test-depends
191+
debugger-distribution
192+
install-debugger-distribution
193+
install-debugger-distribution-stripped
194+
install-debugger-distribution-toolchain)
200195
endif()
201196

202197
set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "")
@@ -205,7 +200,6 @@ set(CLANG_BOOTSTRAP_TARGETS ${_FUCHSIA_BOOTSTRAP_TARGETS} CACHE STRING "")
205200
get_cmake_property(variableNames VARIABLES)
206201
foreach(variableName ${variableNames})
207202
if(variableName MATCHES "^STAGE2_")
208-
list(APPEND EXTRA_ARGS "-D${variableName}=${${variableName}}")
209203
string(REPLACE "STAGE2_" "" new_name ${variableName})
210204
string(REPLACE ";" "|" value "${${variableName}}")
211205
list(APPEND EXTRA_ARGS "-D${new_name}=${value}")
@@ -215,9 +209,6 @@ endforeach()
215209
# TODO: This is a temporary workaround until we figure out the right solution.
216210
set(BOOTSTRAP_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
217211

218-
set(LLVM_BUILTIN_TARGETS "default" CACHE STRING "")
219-
set(LLVM_RUNTIME_TARGETS "default" CACHE STRING "")
220-
221212
# Setup the bootstrap build.
222213
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
223214
set(CLANG_BOOTSTRAP_EXTRA_DEPS
@@ -226,5 +217,5 @@ set(CLANG_BOOTSTRAP_EXTRA_DEPS
226217
CACHE STRING "")
227218
set(CLANG_BOOTSTRAP_CMAKE_ARGS
228219
${EXTRA_ARGS}
229-
-C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2-instrumented.cmake
220+
-C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
230221
CACHE STRING "")

clang/docs/BoundsSafety.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,13 @@ the transformed pseudo code of function ``alloc_buf()`` in the example below.
777777
size_t count;
778778
} sized_buf_t;
779779
780-
void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
780+
void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
781781
sbuf->buf = (int *)malloc(sizeof(int) * nelems);
782782
sbuf->count = nelems;
783783
}
784784
785785
// Transformed pseudo code:
786-
void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
786+
void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
787787
// Materialize RHS values:
788788
int *tmp_ptr = (int *)malloc(sizeof(int) * nelems);
789789
int tmp_count = nelems;

clang/docs/BoundsSafetyImplPlans.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ same basic block and without side effect in between.
134134
int *__counted_by(count) buf; size_t count;
135135
} sized_buf_t;
136136
137-
void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
137+
void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
138138
sbuf->buf = (int *)malloc(sizeof(int) * nelems);
139139
sbuf->count = nelems;
140140
}

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,24 @@ the configuration (without a prefix: ``Auto``).
21822182
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
21832183
}
21842184

2185+
.. _BinPackLongBracedList:
2186+
2187+
**BinPackLongBracedList** (``Boolean``) :versionbadge:`clang-format 21` :ref:`<BinPackLongBracedList>`
2188+
If ``BinPackLongBracedList`` is ``true`` it overrides
2189+
``BinPackArguments`` if there are 20 or more items in a braced
2190+
initializer list.
2191+
2192+
.. code-block:: c++
2193+
2194+
BinPackLongBracedList: false vs. BinPackLongBracedList: true
2195+
vector<int> x{ vector<int> x{1, 2, ...,
2196+
20, 21};
2197+
1,
2198+
2,
2199+
...,
2200+
20,
2201+
21};
2202+
21852203
.. _BinPackParameters:
21862204

21872205
**BinPackParameters** (``BinPackParametersStyle``) :versionbadge:`clang-format 3.7` :ref:`<BinPackParameters>`

clang/docs/OpenMPSupport.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ implementation.
416416
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
417417
| safe_sync and progress with identifier and API | :none:`unclaimed` | :none:`unclaimed` | |
418418
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
419-
| OpenMP directives in concurrent loop regions | :none:`unclaimed` | :none:`unclaimed` | |
419+
| OpenMP directives in concurrent loop regions | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/125621 |
420420
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
421-
| atomics constructs on concurrent loop regions | :none:`unclaimed` | :none:`unclaimed` | |
421+
| atomics constructs on concurrent loop regions | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/125621 |
422422
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
423423
| Loop construct with DO CONCURRENT | :none:`unclaimed` | :none:`unclaimed` | |
424424
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
@@ -456,9 +456,7 @@ implementation.
456456
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
457457
| map-type modifiers in arbitrary position | :none:`unclaimed` | :none:`unclaimed` | |
458458
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
459-
| atomic constructs in loop region | :none:`unclaimed` | :none:`unclaimed` | |
460-
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
461-
| Lift nesting restriction on concurrent loop | :none:`unclaimed` | :none:`unclaimed` | |
459+
| Lift nesting restriction on concurrent loop | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/125621 |
462460
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
463461
| priority clause for target constructs | :none:`unclaimed` | :none:`unclaimed` | |
464462
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Bug Fixes to C++ Support
151151
^^^^^^^^^^^^^^^^^^^^^^^^
152152

153153
- Clang is now better at keeping track of friend function template instance contexts. (#GH55509)
154+
- The initialization kind of elements of structured bindings
155+
direct-list-initialized from an array is corrected to direct-initialization.
154156

155157
Bug Fixes to AST Handling
156158
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -237,6 +239,8 @@ clang-format
237239
------------
238240

239241
- Adds ``BreakBeforeTemplateCloser`` option.
242+
- Adds ``BinPackLongBracedList`` option to override bin packing options in
243+
long (20 item or more) braced list initializer lists.
240244

241245
libclang
242246
--------

0 commit comments

Comments
 (0)