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

Do not build Demangle on Swift 5.9 or above #73

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Backtrace/Demangle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
//
//===----------------------------------------------------------------------===//

// Swift 5.9 has its own built-in backtracing support in the runtime;
// we don't want to activate this library if we're using 5.9 or above.
#if !(swift(>=5.9) && !os(Windows))

#if os(Linux)
import Glibc
#elseif os(Windows)
Expand Down Expand Up @@ -55,3 +59,5 @@ internal func _stdlib_demangleName(_ mangledName: String) -> String {
}
}
#endif

#endif
4 changes: 3 additions & 1 deletion Sources/Sample/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
import Backtrace
#if canImport(Darwin)
import Darwin
#elseif os(Linux)
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

#if swift(<5.9) || os(Windows)
Expand Down