When the benchmarks are built with SwiftPM, the -std=c++20 flag is passed if the -cxx-interoperability-mode is present. This patch switches from -Xfrontend -enable-experimental-cxx-interop to the required interoperability flag.
Bump the deployment target from macOS 10.13-aligned versions to macOS
13.0-aligned versions. This allows us to stop linking CoreFoundation
in the swift runtime, which was previously required for availability
checking. It also lets us align the deployment target on x86_64 with
arm64, which was 11.0. Finally, it is a prerequisite to being able to
build swift using the macOS 15 beta SDKs.
The C++ interop benchmarks were only running when building with CMake, not with SwiftPM, because of a bug that was only triggering with SwiftPM. That bug seems to be fixed now.
This adds an `import CxxStdlib` statement which fixes compilation. It should be redundant, but it works around a bug that got exposed by an change in explicit modules (rdar://128520766).
This will bring back the performance numbers while the underlying issue is being investigated.
The two benchmarks don't currently build in some configurations. Also
disabled building ReadAccessor whose running had previously been
disabled because it doesn't build anymore.
rdar://128520766
* Revert "Revert count(where:)"
This reverts commit 779ea19a6a.
Now that SE-0220 has been re-accepted, this adds the `count(where:)`
Sequence method to the standard library.
This commit addresses some trials and tribulations I encountered while working on (#71786). It:
1. fixes the auto-registration regex
2. fixes the auto-generated array's name
3. generates the current year for the license header
4. generates some dashes for the license header
The optimizer managed to eliminate this entire benchmark,
resulting in useless 0 second timings.
I made a couple of changes to ensure the optimizer cannot
eliminate the loop:
* The individual checks now actually use the loop parameter
* `identity()` is used to ensure conservatism
While here, I reduced the loop count since these benchmarks seem
to run for a long time.
Without additional options, build-script -B was badly broken:
* It added a broken --independent-samples option to the driver command line
* Slow tests that ran only 1 sample by default would break the statistics
Fix the first issue by adding `--independent-samples` to the command
line only when a sample was actually provided by other options.
Fix the second issue by including `--min-samples=2` in the command.
So that it cannot interfere with some leftovers from other compiler runs.
This is important for SDK modules which are generated from swiftinterface files (like Foundation).
The cached SDK module should be built with the compiler to benchmark (and not being reused from other compiler runs).
As of CMake 3.25, there are now global variables `LINUX=1`, `ANDROID=1`,
etc. These conflict with expressions that used these names as unquoted
strings in positions where CMake accepts 'variable|string', for example:
- `if(sdk STREQUAL LINUX)` would fail, because `LINUX` is now defined and
expands to 1, where it would previously coerce to a string.
- `if(${sdk} STREQUAL "LINUX")` would fail if `sdk=LINUX`, because the
left-hand side expands twice.
In this patch, I looked for a number of patterns to fix up, sometimes a
little defensively:
- Quoted right-hand side of `STREQUAL` where I was confident it was
intended to be a string literal.
- Removed manual variable expansion on left-hand side of `STREQUAL`,
`MATCHES` and `IN_LIST` where I was confident it was unintended.
Fixes#65028.