This is motivated by an experiment to build DocC with CMake which
exposed a bug in the Swift driver. This allows us to workaround that bug
with the Swift Swift driver.
Emit this in a `finally` block ensuring that it is printed at the end
under all circumstances. Reduce the column width by making the checkout
`SourceCache` relative.
`-Test swiftpm` will use the self-hosted build of SPM to run the test
suite. By using the `SWIFTCI_USE_LOCAL_DEPS=1` environment variable, we
do reduce some of the cost of this by not recloning the repositories,
but the entire dependency tree must be built a second time due to the
switch in the build system.
Use the new CMake options for controlling debug information generation.
This matches the recommendations from sccache and avoids us trying to
map flags manually.
When we build the standard library, we use the just built compilers.
However, we would not pass the necessary flags to the linker to generate
the debug information (PDBs) which would then make debugging more
challenging than it already is.
Use the installed image rather than the build tree for wiring up CMark.
This may be used across phases of the build, so it is better to use the
staged image.
We would use integral values to identify the target library rather than
using a named enumerator. Change to a named enumerator and inline some
cases where we would explain the code by creating variables.
This allows us to build swift-format with dynamic linking against the
toolchain build of the swift-syntax and swift-argument-parser packages.
Wire up the swift-markdown build and hoist the swift-format build prior
to sourcekit-lsp. This sets us up for supporting swift-format based
formatting in the LSP.
When the compiler changes, the SDK and tool builds do not notice the
compiler change due to the missing compiler tracking. This allows us to
quickly perform an incremental by not discarding the compiler build.
Extricate cmark from the unified build system. This is preparatory work
to support building CMark GFM with dynamic linkage for sharing it across
swift-markdown and the compiler. It also simplifies the build logic for
the unified build.
Re-use the existing `-InstallTo` option over the `CMAKE_INSTALL_PREFIX`
CMake parameter for building the targets. This cleans up the options
usage to use that mechanism. The intention is to minimise the custom
parameters to CMake in favour of a standard option handling.
Conditionalise the inclusion of directory paths. If the include
directory is empty, CMake will raise an error. This allows us to disable
larger portions of the Swift build to speed up some of the build tool
configuration phase and prepares for consuming CMark GFM as a CMake
project.
Add a directory creation path prior to downloading. In the case that the
build tree did not exist, we would fail to fetch the content. This
allows us to build on a fresh setup.
Centralise the downloading of dependencies. This merges the SDK,
toolchain, and WiX downloading. This is a small clean up and
preparatory work to enable fetching sccache as well to ease the caching
setup.
When building C/C++ code we need to add `/debug` to the flags. However,
if we are building Swift code, this becomes a problem as the flag is
passed to the Swift compiler directly. Only pass the flag when C/C++
code is being built.
This adds the ability to conditionally run the test suite for LLVM, LLD,
LLDB, Clang, and Swift. This will allow us to increase the test
coverage in CI to avoid regressions.
Swift has some module maps it overlays on Linux and Windows that groups all of the C standard library headers into a single module. This doesn’t allow clang and C++ headers to layer properly with the OS/SDK modules. clang will set -fbuiltin-headers-in-system-modules as necessary for Apple SDKs, but Swift will need to pass that flag itself when required by its module maps.
Integrate support for sccache into the build system. This allows us to
get a reasonable performance increase for clean builds for the C/C++
side of the build. This is currently limited to the MSVC compiler as
the extended compiler flags cause issues for sccache.
Update the variables for the pinned-toolchain usage to correctly specify the compilers. Additionally use the new helpers to work with the new toolchain layout as well.
Adjust the flags for the updated CURL version. It seems that we accidentally disabled HTTPS support in the CURL builds with the last update. This is required for `URLSession` and `URLRequest` to support HTTPS.