Do not build Demangle on Swift 5.9 or above

Pull request #68 prevents Backtrace from being built on Swift 5.9 and above,
but Demangle is still built and fails when the importing project uses musl.
This commit is contained in:
Euan Harris
2024-06-13 13:32:14 +01:00
parent 525d45046b
commit d4f33e71ca
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -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)
@@ -55,3 +59,5 @@ internal func _stdlib_demangleName(_ mangledName: String) -> String {
}
}
#endif
#endif
+3 -1
View File
@@ -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)