mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-04 05:57:42 +08:00
Enable crash reporting via Swift on macOS 15
Swift 5.9 includes built in crash reporting, printing stack traces, libraries, and registers to stdout/err. https://www.swift.org/blog/swift-5.9-backtraces/ As (Core)Foundation is written in Swift nowadays, we get this feature for free even in our "C++" apps, as we always link to CoreFoundation. Our test binaries have been taught how to hook into this, so the remaining step is to enable it via the SWIFT_BACKTRACE env var. Pick-to: 6.9 Change-Id: I72dbd9ea934ecc3091766456509f4bd42b2bdab8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -5,3 +5,8 @@
|
||||
set -ex
|
||||
|
||||
defaults write com.apple.CrashReporter DialogType server
|
||||
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
SetEnvVar "SWIFT_BACKTRACE" "enable=yes,output-to=stderr,preset=medium,interactive=false"
|
||||
|
||||
@@ -5,3 +5,8 @@
|
||||
set -ex
|
||||
|
||||
defaults write com.apple.CrashReporter DialogType server
|
||||
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
SetEnvVar "SWIFT_BACKTRACE" "enable=yes,output-to=stderr,preset=medium,interactive=false"
|
||||
|
||||
Reference in New Issue
Block a user