This patch adds the ability to produce a summary report with a few KPIs
in the compare-benchmarks script. This is useful to regularly monitor
the progress of the library on these KPIs.
Example usage:
compare-benchmarks libstdcxx.lnt llvm-20.lnt llvm-21.lnt main.lnt \
--series-names "GNU,LLVM 20,LLVM 21,LLVM main" \
--format kpi \
--noise-threshold 0.1 \
--meta-candidate 'LLVM'
This would produce a short report showing the evolution of benchmarks
in the given LLVM releases as compared to a GNU baseline.
clang-tidy doesn't run checks anymore in system headers by default in
new versions to reduce runtime. In this case it's problematic, since we
want to check system headers.
Previously, the bootstrapping-build job defined in run-buildbot required
the CC and CXX environment variables to be defined even though
run-buildbot documents these environment variables as being optional. It
also relied on ccache being available.
Refactor run-buildbot to make CC and CXX mandatory, and refactor various
places in the CI where we called run-buildbot without setting CC and
CXX. After this patch, all places that use run-buildbot are setting CC
and CXX before calling the script, which makes it easier to track what
compiler is used where. This also allows simplifying run-buildbot
itself.
Finally, this patch makes ccache optional for running the bootstrapping
build.
This replaces detection of picolibc in libc++ (by checking for and
including picolibc.h) with using RUNTIMES_USE_LIBC build time option
intriduced in https://github.com/llvm/llvm-project/pull/134893
RUNTIMES_USE_LIBC is extended to accept picolibc and newlib.
Detection of picolibc via the header is kept as a deprecated feature to
avoid breaking builds.
libc++ is updated to use dedicated LIBCXX_LIBC_NEWLIB macro to check for
newlib specific conditions instead of less informative _NEWLIB_VERSION
---------
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
Currently, there are no diagnostics issued when including a deprecated
header, since the diagnostic is issued inside a system header. This
patch fixes that by using `#warning` instead, which also simplifies the
implementation of the deprecation warnings.
Otherwise, we end up using whatever system-provided compiler runtime is
available, which doesn't work on macOS since compiler-rt is located
inside the toolchain path, which can't be found by default.
However, disable the tests for compiler-rt since those are linking
against the system C++ standard library while using the just-built
libc++ headers, which is non-sensical and leads to undefined references
on macOS.
Instead of having one large Dockerfile building multiple images with
relatively confusing inheritance, explicitly have three standalone
Dockerfiles each building one image. Then, tie the three images together
using the docker-compose file which explicitly versions the base image
used by the Android and the Github Actions images.
Lit has a number of options controlling the output, but they don't
compose very well. This breaks the existing options down into smaller,
orthogonal options, and makes the existing options aliases of the new
ones.
This introduces the following options:
--test-output {off,failed,all}
--print-result-after {off,failed,all}
--diagnostic-level {error,warning,note}
--terse-summary
--no-terse-summary
--progress-bar (mirroring --no-progress-bar)
--test-output and --print-result-after are not entirely orthogonal, as
'--test-output X' requires that --print-result-after is set to at least
X, and implicitly does so if it isn't already. Conversely,
'--print-result-after Y' requires that --test-output is at most Y, and
implicitly lowers if it is higher. This means that the following
invocations have different end results, as they are applied in order:
'--test-output all --print-result-after off'
'--print-result-after off --test-output all'
The following existing options are now aliases as follows:
-q, --quiet
'--diagnostic-level error --test-output off --terse-summary'
-s, --succinct
'--progress-bar --print-result-after failed'
-v, --verbose
'--test-output failed'
-a, --show-all
'--test-output all'
These where all completely separate options and would override each
other in ad-hoc ways, with no regard to the order they were given.
This fixes https://github.com/llvm/llvm-project/issues/106643 This is
based on the RFC
https://discourse.llvm.org/t/rfc-new-command-line-options-for-controlling-llvm-lit-output/
with the addition of --terse-summary, which was a behaviour of -q that
was not captured by the original RFC. This also diverges from the RFC in
that --debug is NOT folded into --diagnostic-level, because it can be
useful to debug any configuration, including those specifying
--diagnostic-level.
Example combination that is possible now but wasn't before:
'--diagnostic-level error --test-output all --progress-bar' Another use
case is aliases, where you can alias e.g:
alias lit=llvm-lit --quiet
but still override the specified default options.
Resolves#148131
- Unlock `std::optional<T&>` implementation
- Allow instantiations of `optional<T(&)(...)>` and `optional<T(&)[]>`
but disables `value_or()` and `optional::iterator` + all `iterator`
related functions
- Update documentation
- Update tests
The features.py file that performs detection of Lit features had grown
to be massive, so this patch splits it into smaller chunks which makes
it easier to keep things organized.
This ensures that run-buildbot can find the appropriate build tools
without having to go through a bunch of hoops inside run-buildbot
itself. When we eventually run the bootstrapping build on macOS, it also
allows the bootstrapped Clang to find the SDK headers it requires.
This also allows simplifying run-buildbot a bunch since we should be
able to find build tools in the current $PATH.
An LLVM 19-aligned libc++ was released with macOS 15.4 (and corresponding OSes),
and LLVM-20 aligned with macOS 26.0. This patch adds availability markup to
reflect that.
<https://wg21.link/P2641R4>
Implements the C++26 function in `<type_traits>` [meta.const.eval] (and
the corresponding feature test macro `__cpp_lib_is_within_lifetime`)
```c++
template<class T>
consteval bool is_within_lifetime(const T*) noexcept;
```
This is done with the `__builtin_is_within_lifetime` builtin added to
Clang 20 by #91895 / 2a07509c8d. This is
not (currently) available with GCC.
This implementation has provisions for LWG4138
<https://cplusplus.github.io/LWG/issue4138> where it is ill-formed to
instantiate `is_within_lifetime<T>` with a function type `T`.
Closes#105381
Co-authored-by: Mital Ashok <mital@mitalashok.co.uk>
Define `_LIBCPP_HAS_C8RTOMB_MBRTOC8` to `1` if compiling with clang.
Some tests involving functionality from `uchar.h`/`cuchar` fail when the
platform or the supporting C library does not provide support for the
corresponding features. These have been xfailed.
This patch will enable the adoption of newer picolibc versions.
Based on review feedback in #160026.
This makes the substitution a lot more clear now that there is no
documentation around %T.
---------
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
In the libc++ test suite, we consistently declare main() functions with
full parameters and explicitly return from the function. This helps code
that compiles the tests with -ffreestanding, where main() is not a
special function (with an implicit return and special mangling).
This patch fixes a few stray declarations, including in libunwind and
libc++abi.
Apple dropped support for some older platforms, so we can also remove
the annotations for them.
See https://developer.apple.com/support/xcode/ for the supported
versions.
This patch adds a %T substitution directly into the libc++ test format.
This ensures that the libc++ test format will continue to work when we
remove support for %T in llvm lit.
Reviewers: #reviewers-libcxx, ldionne, philnik777
Pull Request: https://github.com/llvm/llvm-project/pull/160026
Previously, we would report a successful run if the benchmark exited
with an error, and we would produce a timing for the benchmark. After
this patch, we consider an error in the benchmark to be a failed LIT
test and we don't produce any benchmark data for it.