Use the new module structure rather the old SwiftShims header. This
is much cleaner and lets us include operating system headers to get
the relevant definitions where possible.
Add code to support ELF and DWARF, including decompression using
zlib, zstd and liblzma if those turn out to be required and available.
rdar://110261712
The `withCurrentContext()` methods on the `Context` structs need to be
inlined, even in debug builds, otherwise we would need to skip an extra
frame at the top of the backtrace.
This fixes test failures in debug stdlib builds.
rdar://106276227
On ARM Windows, we need MARMASM to assemble the context capture code,
but CMake doesn't support MARMASM until version 3.26, which isn't yet
released.
(Confusingly it appears to have partial but non-working support in the
present versions.)
rdar://106284325
The Linux Swift compiler is ICEing when building _Backtracing, while
Windows still needs some tweaks. In order to land this sooner, disable
this code except for macOS.
While I was doing this, it turns out Saleem was fixing things to avoid
having to patch the Windows include directories, which is awesome but
necessitates an extra change to the backtracing stuff to make the build
not fail on Windows.
rdar://105409147
Adds a new swift_Backtracing library, with a corresponding _Backtracing
module, to the build. Also add some tests.
This is not public API at this point, but will be used by the external
backtracing program, `swift-backtrace`.
rdar://104336548