Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit 5bed8f3

Browse files
committed
Disable this library for Swift 5.9 and above.
Swift 5.9 has a new built-in backtrace-on-crash facility, which supersedes this library. rdar://111109405
1 parent 2cfddd6 commit 5bed8f3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Sources/Backtrace/Backtrace.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if os(Linux)
15+
// Swift 5.9 has its own built-in backtracing support in the runtime;
16+
// we don't want to activate this library if we're using 5.9 or above.
17+
#if swift(>=5.9) && !os(Windows)
18+
public enum Backtrace {
19+
@available(*, deprecated, message: "This is no longer needed in Swift 5.9")
20+
public static func install() {}
21+
22+
@available(*, deprecated, message: "This is no longer needed in Swift 5.9")
23+
public static func install(signals: [CInt]) {}
24+
25+
@available(*, deprecated, message: "This method will be removed in the next major version.")
26+
public static func print() {}
27+
}
28+
#elseif os(Linux)
1629
import CBacktrace
1730
import Glibc
1831

0 commit comments

Comments
 (0)