Skip to content

Commit 0097f7e

Browse files
committed
Change the logic to exclude extended frame info on all platforms but darwin
1 parent f3d5ad5 commit 0097f7e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,8 +1768,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
17681768
}
17691769
}
17701770

1771-
// Default to disabling swift async extended frame info on linux.
1772-
if (Triple.getOS() == llvm::Triple::Linux) {
1771+
// Default to disabling swift async extended frame info on anything but
1772+
// darwin. Other platforms are unlikely to have support for extended frame
1773+
// pointer information.
1774+
if (!Triple.isOSDarwin()) {
17731775
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Never;
17741776
}
17751777
if (const Arg *A = Args.getLastArg(OPT_swift_async_frame_pointer_EQ)) {

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ if(NOT swift_concurrency_async_fp_mode)
4545
set(swift_concurrency_async_fp_mode "always")
4646
endif()
4747

48-
# Don't emit extended frame info on linux, system backtracer and system debugger
49-
# are unlikely to support it.
50-
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
51-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
52-
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
53-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=${swift_concurrency_async_fp_mode}")
48+
# Don't emit extended frame info on platforms other than darwin, system
49+
# backtracer and system debugger are unlikely to support it.
50+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
51+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS
52+
"-fswift-async-fp=${swift_concurrency_async_fp_mode}")
5453
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS
5554
"-Xfrontend"
5655
"-swift-async-frame-pointer=${swift_concurrency_async_fp_mode}")
56+
else()
57+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
5758
endif()
5859

5960
add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB

0 commit comments

Comments
 (0)