https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/777/consoleText
```
Error: Program 'python.exe' failed to run: The specified executable is not a valid application for this OS platform.At C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift\utils\build.ps1:545 char:7
+ & $Executable @Args | Out-Null
+ ~~~~~~~~~~~~~~~~~~~.
```
Enable support for libxml2 on Windows to allow `llvm-mt` to be usable.
This then allows us to use `llvm-mt` as the manifest tool when building
for Windows. Remove the then obsoleted workaround of `-D CMAKE_MT=mt`.
This reduces the dependency on the MSVC toolchain and paves the path to
enabling the use of the manifest tool in SPM.
This switches us to use CMake to build swift-inspect. In doing so, we
can now cross-compile this tool. Due to the use of CMake, we now have
install rules for the products, which allows the toolchain deployment
and simpler rules in the installer.
This adjusts the build to create a shared (static) build of LMDB.
Re-order the build rules, wire up the LMDB build into IndexStoreDB and
SourceKit-LSP.
Add @PointerBounds macro
@PointerBounds is a macro intended to be applied by ClangImporter when
importing functions with pointer parameters from C headers. By
leveraging C attributes we can get insight into bounds, esapability, and
(eventually) lifetimes of pointers, allowing us to map them to safe(r)
and more ergonomic types than UnsafePointer.
This initial macro implementation supports CountedBy and Sizedby, but
not yet EndedBy. It can generate function overloads with and without an
explicit count parameter, as well as with UnsafeBufferPointer or Span
(if marked nonescaping), and any of their combinations. It supports
nullable/optional pointers, and both mutable and immutable pointers.
It supports arbitrary count expressions. These are passed to the macro
as a string literal since any parameters referred to in the count
expression will not have been declared yet when parsing the macro.
It does not support indirect pointers or inout parameters. It supports
functions with return values, but returned pointers can not be bounds
checked yet.
Bounds checked pointers must be of type Unsafe[Mutable]Pointer[?]<T>
or Unsafe[Mutable]RawPointer[?]. Count expressions must conform to
the BinaryInteger protocol, and have an initializer with signature
"init(exactly: Int) -> T?" (or be of type Int).
rdar://137628612
---------
Co-authored-by: Doug Gregor <dgregor@apple.com>
The basic idea is that we build all libraries for the executable that will be included in the toolchain using CMake. swift-format then has a mode in its Package manifest that allows it to build just the test and test support targets, requiring all search paths to find those libraries to be passed in. We use that to only build swift-format's test using SwiftPM and re-use all the libraries that were already built using CMake.
* Copy Testing modules/binaries in Install-Platform
* Copy full Testing.swiftmodule directory rather than individual files
* Fix Copy-Directory command