Files
swift-mirror/lib/Frontend/CompilerInvocation.cpp
Doug Gregor f0cd714161 Rework the watchOS concurrency back-deployment async frame pointer.
Introduce a few changes to the logic for watchOS concurrency
back-deployment with respect to the async frame pointer.

* Only apply the change to watchOS device targets, not simulator targets
* Only introduce the override when no specific
  `-swift-async-frame-pointer=<value>` option is provided on the
command line
* Only override the default when deploying to watchOS < 8, and
* Use "never" for the default rather than "always".

This represents a different but safer trade-off than before. Setting
the async bit in the frame pointer can cause older APIs (such as
backtrace APIs in the OS) to crash when they encounter such frame
pointers. So, with this change we never set the bit when back-deploying
for watchOS device, to avoid said crashes.

The trade-off here is that a back-deployed watchOS app will never have
the async frame pointer bit set, so async backtraces will be
unavailable even when running on watchOS 8 or newer.
2021-10-27 12:04:20 -07:00

86 KiB