mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Disable the definition and use of swift_async_extendedFramePointerFlags on watchOS
The asm definition of `swift_async_extendedFramePointerFlags` prevents the use of bitcode with the back-deployment libraries, so remove the definition and use of this symbol from watchOS binaries entirely. Instead, always force the async frame bit to be set. This trades off backtraces on older OS's for debuggability of newer ones. If it causes problems, it can be disabled via the option `-swift-async-frame-pointer=never`. Fixes rdar://84687579.
This commit is contained in:
@@ -1984,6 +1984,14 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
// watchOS does not support auto async frame pointers due to bitcode, so
|
||||
// silently override "auto" to "always". This approach sacrifies async
|
||||
// backtraces in older watchOS versions to gain better backtraces in newer
|
||||
// versions.
|
||||
if (Triple.isWatchOS() &&
|
||||
Opts.SwiftAsyncFramePointer == SwiftAsyncFramePointerKind::Auto)
|
||||
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Always;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user