This patch introduces `--enable-experimental-noncopyable-generics` for
the build script. It replaces
`--swift-stdlib-experimental-noncopyable-generics`
The old build option only enables the feature when building the
stdlib, but if we've built the stdlib with NoncopyableGenerics, the
compiler should be hardwired to have that feature enabled, too.
This patch also introduces the `noncopyable_generics` lit parameter, so
that tests assuming the system was built with the feature can live
in-tree and be tested, if they specify `REQUIRES: noncopyable_generics`.
This removes >70 tests from the list of tests that are being rerun. The REPL
doesn't really benefit from DWARFImporter, since there is no deb ug info in the
victim process, so it makes no sense to test this configuration.
Add a `SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE` CMake option. When set to true, swift_retain/release and the other functions in InstrumentsSupport.h can be overridden by setting the appropriate global function pointer, as is already the case. When set to false, those function pointers are removed and the functions always go into the default implementation.
Set `SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE` to false when building the minimal stdlib, and set it to true otherwise by default.
rdar://115987924
Use FetchContent to include swift-syntax directly in swift. This can be
thought of as an `add_subdirectory` for a directory outside the root.
The default build directory will be `_deps/swiftsyntax-subbuild/`, though
the modules and shared libraries will be built in `lib/swift/host` by
passing down `SWIFT_HOST_LIBRARIES_DEST_DIR` to avoid copying them as we
were doing previously.
This solves deprecation warnings in build-script:
```
DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
```
This change assumes that the minimum version
of Python3 is 3.3, which has `shlex.quote`.
Since our build bots currently use 3.6 as their
Python version, we can't yet use `shlex.join`
to further simplify some of the code using
quote.
We recently changed the build-script to stop configuring LLDB
tests if `SKIP_TESTS_LLDB` is set (see rdar://109774179 and
https://github.com/apple/swift/pull/66171).
A common use-case is to build lldb without `-t` (to avoid running the
tests) and then run the tests separately later. However, if we don't
specify the `-t` flag to the build-script, `SKIP_TESTS_LLDB` is implicitly set.
Meaning this multi-step way of running lldb tests regressed.
This patch addresses this by creating a new `--lldb-configure-tests`
option which when set makes sure we set the CMake variable
`LLDB_INCLUDE_TESTS` (which will be the default behaviour).
The preset for which we originally introduced the `SKIP_TESTS_LLDB` check
now sets this new option to `0` to avoid configuring LLDB tests. The
preset skips running the tests anyway, we're not losing test coverage.
Section scans (for metadata, protocols, etc.) can be costly. This change adds tracing calls to those scans so we can more easily see how much time is spent in these scans and where they're initiated.
This adds an os_signpost implementation controlled by SWIFT_STDLIB_TRACING, and a default empty implementation for when that's disabled.
rdar://110266743
wasi-wasm32 support in build system was added in
b1236e92f9 but we forgot to add it to the
host for the case when we are building the standalone stdlib for the
target.
Currently the `--skip-test-lldb` flag will only skip *running* the
tests. But we still pass `LLDB_INCLUDE_TESTS` to CMake when configuring
LLDB.
Since https://github.com/apple/swift/pull/66018 configuring LLDB tests will
now always require libcxx to be built. For some presets (e.g.,
`buildbot_osx_package`) we don't need to build libcxx and we explicitly
pass `--skip-test-lldb`; this means if we were to try configure LLDB
tests we would hard error.
The proposed solution is to check whether the user wants to skip LLDB
tests, and if so, set `LLDB_INCLUDE_TESTS=FALSE`.
rdar://109774179
Currently any buildbot that runs LLDB API tests does so
against the system SDK. However, we explicitly need users
to run the tests against a newly built libcxx. We recently
added a new `LLDB_TEST_LIBCXX_ROOT_DIR` CMake variable to
LLDB to allow standalone builds to point their tests to
a custom libcxx directory.
This patch makes sure the relevant LLDB presets build
libcxx and then sets above CMake variable.
CMake: fix missing `SWIFT_CONCURRENCY_GLOBAL_EXECUTOR` value
`SWIFT_CONCURRENCY_GLOBAL_EXECUTOR` is defined in `stdlib/cmake/modules/StdlibOptions.cmake`, which is not included during the first pass of evaluation of the root `CMakeLists.txt`. It is available on subsequent evaluations after the value is stored in CMake cache. This led to subtle bugs, where `usr/lib/swift_static/linux/static-stdlib-args.lnk` didn't contain certain flags on clean toolchain builds, but did contain them in incremental builds.
Not having these autolinking flags in toolchain builds leads to errors when statically linking executables on Linux.
Additionally, since are trivial tests previously didn't link Dispatch statically, the didn't expose a bug where `%import-static-libdispatch` substitution had a missing value. To fix that I had to update `lit.cfg` and clean up some of the related path computations to infer a correct substitution value.
Resolves some of the errors reported in https://github.com/apple/swift/issues/65097.
A workaround for the fact that fixing this in XCTest's repository
(https://github.com/apple/swift-corelibs-xctest/pull/441) is blocked on XCTest's
CI being broken for unrelated reasons (and ones which I cannot reproduce).
* Bump host tools deployment version for Darwin OS
* Update availability_define.swift
* Fix the test to use @backDeployed from @_backDeploy
---------
Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>