Skip to content

Commit a1a9dd1

Browse files
committed
Change the logic to exclude extended frame info on all platforms but darwin
1 parent 2381233 commit a1a9dd1

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
@@ -1908,8 +1908,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
19081908
Opts.VirtualFunctionElimination = true;
19091909
}
19101910

1911-
// Default to disabling swift async extended frame info on linux.
1912-
if (Triple.getOS() == llvm::Triple::Linux) {
1911+
// Default to disabling swift async extended frame info on anything but
1912+
// darwin. Other platforms are unlikely to have support for extended frame
1913+
// pointer information.
1914+
if (!Triple.isOSDarwin()) {
19131915
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Never;
19141916
}
19151917
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
@@ -39,15 +39,16 @@ if(NOT swift_concurrency_async_fp_mode)
3939
set(swift_concurrency_async_fp_mode "always")
4040
endif()
4141

42-
# Don't emit extended frame info on linux, system backtracer and system debugger
43-
# are unlikely to support it.
44-
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
45-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
46-
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
47-
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=${swift_concurrency_async_fp_mode}")
42+
# Don't emit extended frame info on platforms other than darwin, system
43+
# backtracer and system debugger are unlikely to support it.
44+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
45+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS
46+
"-fswift-async-fp=${swift_concurrency_async_fp_mode}")
4847
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS
4948
"-Xfrontend"
5049
"-swift-async-frame-pointer=${swift_concurrency_async_fp_mode}")
50+
else()
51+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_C_FLAGS "-fswift-async-fp=never")
5152
endif()
5253

5354
add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB

0 commit comments

Comments
 (0)