Skip to content

Commit 0b21f02

Browse files
aschwaighoferDougGregor
authored andcommitted
Change the logic to exclude extended frame info on all platforms but darwin
(cherry picked from commit a1a9dd1)
1 parent 751c909 commit 0b21f02

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
@@ -1804,8 +1804,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
18041804
}
18051805
}
18061806

1807-
// Default to disabling swift async extended frame info on linux.
1808-
if (Triple.getOS() == llvm::Triple::Linux) {
1807+
// Default to disabling swift async extended frame info on anything but
1808+
// darwin. Other platforms are unlikely to have support for extended frame
1809+
// pointer information.
1810+
if (!Triple.isOSDarwin()) {
18091811
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Never;
18101812
}
18111813
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
@@ -37,15 +37,16 @@ if(NOT swift_concurrency_async_fp_mode)
3737
set(swift_concurrency_async_fp_mode "always")
3838
endif()
3939

40-
# Don't emit extended frame info on linux, system backtracer and system debugger
41-
# are unlikely to support it.
42-
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
43-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
44-
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
45-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=${swift_concurrency_async_fp_mode}")
40+
# Don't emit extended frame info on platforms other than darwin, system
41+
# backtracer and system debugger are unlikely to support it.
42+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
43+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS
44+
"-fswift-async-fp=${swift_concurrency_async_fp_mode}")
4645
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS
4746
"-Xfrontend"
4847
"-swift-async-frame-pointer=${swift_concurrency_async_fp_mode}")
48+
else()
49+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
4950
endif()
5051

5152
add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB

0 commit comments

Comments
 (0)