**Description**: This adds "task name" parameter to all task creating
functions.
This is done in a few ways, e.g. we can backdeploy this to 5.1 in APIs
which do not accept the `TaskExecutor` but it they do we provide a
version for 6.0+ etc. This was requested in the SE acceptable of this
proposal [Acceptance post
SE-0469](https://forums.swift.org/t/accepted-with-modifications-se-0469-task-naming/79438).
This moves all these declarations to gyb since going through them one by
one has become unmaintainable otherwise.
**Scope/Impact**: All task creation APIs now gain a new task name
parameter.
**Risk:** Medium, changes existing APIs rather than adding "even more
overloads" though this risk was discussed in the team and accepted. This
has a potential to be source breaking it someone used Task.init and
friends as function.
**Testing**: CI testing, source compatibility suite testing
**Reviewed by**:
**Original PR:**
- https://github.com/swiftlang/swift/pull/81107 build changes required
for this
- https://github.com/swiftlang/swift/pull/80984
**Radar:**
---------
Co-authored-by: Kuba Mracek <mracek@apple.com>
This tells build-script to build Swift-testing with WMO.
This results in a faster build products, but is also necessary for
configurations using the legacy swift driver, which would emit an
invalid swift interface in non-WMO builds.
Fixes: rdar://151357567
(cherry picked from commit 5f2b0022d1)
Super surprised to see the build for swift test hardcoded in
the build.ps1 script instead of in the sourcekit-lsp repo.
At any rate, looks like I need to add the dependency on ASN1
here too.
This is to support changes in SwiftPM that add the dependency
which translates through to sourcekit-lsp.
https://github.com/swiftlang/swift-package-manager/pull/8610
Updates the build.ps1 script to add the SwiftASN1 package support
to it's CMake build. This was caused by this dependency being added
to a module in SwiftPM that sourcekit-lsp imports.
The concurrency runtimes require that dispatch is installed or it will
fail to load at launch. The C library is built as part of the
concurrency build but is not installed. We need to install a copy of
dispatch so that programs that link concurrency run.
(cherry picked from commit f36391d4c8)
Adding a stage-2 preset. This preset adds SwiftPM and XCTest to the
built products. The stage-1 preset could likely build all of the
product, but because the stage-1 compiler was built without several
optimizations available in the stage-0 compiler, this compiler will not
be as performant as a separate stage-2 compiler.
(cherry picked from commit 4130bca088)
Adding a stage-1 buildbot preset and updating the stage 0 preset to
install the stage0 bootstrap somewhere so that it can be used to
bootstrap the stage-1 toolchain.
(cherry picked from commit d168fc9683)
Adjust the install path computation to support installation of ARM64 on
AMD64. This enables the isolation of the runtimes on all architectures
for Windows to allow building the isolated runtime distribution.
This creates a helper for building the SDK for a given OS/Architecture.
The building of the SDK should be uniform and this ensures that we can
maintain that uniformity.
This also highlights any structural changes that are being adjusted
manually. The desire is to bring this to zero by gaining control over
the install rules.
EnableCaching should only configure cmake to allow for sccache usage, it
should not configure sccache itself in any way. Those configuration
options should be deferred into the environment variables that sccache
will look for when it starts up.
When setting up sccache we can choose between local disk caching or
remote caching via an S3-ish blob storage engine. To allow for backward
compatibility for anyone that might be using the existing option for
disk caching we leave it place and instead provide a new remote caching
option.
This option assumes you've read the sccache documentation for setting up
the correct environment variables for telling sccache where to find the
bucket and how to authenticate to it.
To work-around #80059, we need to stop return address signing and
opt-out of BTCFI enforcement via enabling a platform linker option.
We don't want to completely undo the BTCFI work in the rare case that
we later figure out how to properly address the above issue, or allow
users who might want to benefit from BTCFI enforcement and won't use
Concurrency. To do this, condition the existing BTCFI flag enforcement
into a configuration option that defaults to off for now.
Because the new swift-driver needs to "know" whether the frontend is
configured to opt-out or not, and since the new driver communicates with
the frontend via the target info JSON to begin with, we add a field
that emits the build flavor to signal the right behavior.
Enable the Concurrency runtime for the experimental runtime builds on
Windows. This is required to enable the use of the static runtime to
bootstrap the early swift-driver.
WASI with Embedded Swift provides WASI-libc and libc++ headers necessary to build the `_Concurrency` module for Wasm. We now add `wasm32-unknown-wasip1-wasm` triple to `EMBEDDED_STDLIB_TARGET_TRIPLES` when `SWIFT_WASI_SYSROOT_PATH` is set, which builds the necessary stdlib slice.
---------
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
Ninja requires CMake 3.15 or newer to build, while the CMake on Amazon
Linux 2 is only 2.8. We bootstrap a newer CMake anyway, so build it
before Ninja so that Ninja has a new enough CMake.
If the directory where the build time log is supposed to go doesn't
exist, create it. The append file mode will create files, but won't
create directories. When we start building ninja, we haven't necessary
created the build directory yet, so this results in an error about the
missing directory when writing the build time log.