Commit Graph

9 Commits

Author SHA1 Message Date
Allan Shortlidge ec6bb44c74 stdlib: Adopt #if os(anyAppleOS).
Replace error prone and verbose compilation conditionals like

```
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
```

with

```
#if os(anyAppleOS)
```
2026-03-26 10:19:00 -07:00
Alastair Houghton c432e9df61 [Backtracing] Decrease minimum availability version.
We need a minimum target of 15.7 or below because of CI, so add a new
`BacktracingDT 6.2` define.  This is a bit of a hack for now to
unblock CI upgrades; we can go and clean things up and perhaps
generalise this mechanism later.

rdar://172129091
2026-03-12 11:32:22 +00:00
Allan Shortlidge d4547ec74c stdlib: Fix compiler warnings in Concurrency, Cxx, and RuntimeModule
- Remove spurious `unsafe` on non-unsafe calls in TaskCancellation.swift
  and UnsafeCxxIterators.swift
- Change `var fd` to `let fd` in ImageSource.swift since it is never mutated
2026-02-23 09:35:18 -08:00
Alastair Houghton 245b5e0766 [Backtracing] Add the ability for a SymbolLocator to find images.
This is better than the `alternativePaths` mechanism because it means that
a client of the `Runtime` module can do its own thing, which might even
mean fetching things from a remote server or decompressing files or any
other thing we might find useful.

rdar://170642627
2026-02-18 16:59:52 +00:00
Carl Peto 42ea2a5f7f [Backtracing] Allow symbolication across platforms (#86750)
Instead of the symbolication method being decided by what platform the symbolication code is running on, use a parameter passed to the symbolication function, defaulted to the current platform for backward compatibility.

Useful for the upcoming offline symbolicator.

rdar://168769519

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->

---------

Co-authored-by: Carl Peto <carlpeto@Carls-MacBook-Pro.local>
2026-02-13 13:38:50 +00:00
Alastair Houghton 3cdac64200 [Backtracer] Fix some bugs that prevented DWARF reading.
This is now fetching symbols successfully, though not line numbers
yet.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton d13988bd5f [Backtracing][Windows] Initial Windows support.
This doesn't have a working symbolicator yet, but it does build and
it can obtain a basic backtrace.

It also doesn't include a working `swift-backtrace` program yet.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton 22a7c8fa0a [Backtracing] More availability annotations required.
Apparently we need some more availability annotations.

rdar://164850733
2026-01-09 11:58:36 +00:00
Alastair Houghton 760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00