Skip to content

Commit 03956e0

Browse files
committed
Make swift_async_extendedFramePointerFlags = 0 in back-deployed configurations.
`swift_async_extendedFramePointerFlags` is used in back-deployed concurrency code as a mask to set the extended async frame info bit on OS versions that understand it. Set this mask to zero in the back-deployed libraries.
1 parent 6fd85ac commit 03956e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#include <dlfcn.h>
3434
#endif
3535

36+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT)
37+
asm("\n .globl _swift_async_extendedFramePointerFlags" \
38+
"\n _swift_async_extendedFramePointerFlags = 0x0");
39+
#else
3640
#ifdef __APPLE__
3741
#if __POINTER_WIDTH__ == 64
3842
asm("\n .globl _swift_async_extendedFramePointerFlags" \
@@ -45,6 +49,7 @@ asm("\n .globl _swift_async_extendedFramePointerFlags" \
4549
"\n _swift_async_extendedFramePointerFlags = 0x0");
4650
#endif
4751
#endif // __APPLE__
52+
#endif // !defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT)
4853

4954
using namespace swift;
5055
using FutureFragment = AsyncTask::FutureFragment;

0 commit comments

Comments
 (0)