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.
If the `SWIFTCI_USE_LOCAL_DEPS` environment variable is set, we're building in the Swift.org CI system alongside other projects in the Swift toolchain and we can depend on local versions of our dependencies instead of fetching them remotely.
Ensure that the downloaded image matches the expected image. This
ensures that we catch download errors as well as provides some level of
security by requiring that the download checksum matches.
Use the internal copy of swift-syntax that the compiler uses for macros
to build the LSP. By sharing the swift-syntax build, we shave ~6MiB off
the LSP binary. Additionally, we avoid building swift-syntax twice as a
single copy is now used.
Adjust the installer to allow it to be built for foreign architectures.
Additionally, adjust the artifact staging to include additional content
that was missed previously in order to enable code signing.
Update the build.ps1 to match the current state which introduces
`-BuildTo` and updates most of the dependencies. Take the opportunity to
migrate to update-checkout for the majority of the dependencies. The
SQLite amalgamation and installer image are still fetched later, and ICU
is still cloned in the CI wrapper.