Skip to content

Commit 6a7f7b7

Browse files
committed
CMake: SwiftCore: Add back SWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING
So, despite the name, this is not the same as enabling backtracing.... Somehow. Anyway, this was a macro from the old build that we want in the new build. rdar://142440689
1 parent 9df531a commit 6a7f7b7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Runtimes/Core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ include(gyb)
7272
include(Plist)
7373

7474
check_symbol_exists("asl_log" "asl.h" SwiftCore_HAS_ASL)
75+
check_symbol_exists("backtrace" "execinfo.h" SwiftCore_HAS_BACKTRACE)
7576
check_symbol_exists("dladdr" "dlfcn.h" SwiftCore_HAS_DLADDR)
7677
check_symbol_exists("dlsym" "dlfcn.h" SwiftCore_HAS_DLSYM)
7778

@@ -100,6 +101,7 @@ defaulted_option(SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime.
100101
option(SwiftCore_ENABLE_UNICODE_DATA "Include unicode data in Swift runtimes" ON)
101102
option(SwiftCore_ENABLE_SHORT_MANGLING_LOOKUPS "Build with fast-path context descriptor lookups based on well-known short manglings." ON)
102103
option(SwiftCore_ENABLE_FILESYSTEM_SUPPORT "Build for systems that have a filesystem" ON)
104+
option(SwiftCore_ENABLE_BACKTRACE_REPORTING "Build with backtrace reporting support" ${SwiftCore_HAS_BACKTRACE})
103105

104106
defaulted_option(SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support")
105107
defaulted_set(SwiftCore_BACKTRACER_PATH STRING "Set a fixed path to the Swift backtracer")

Runtimes/Core/runtime/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ target_compile_definitions(swiftRuntime
9999
$<$<BOOL:${SwiftCore_HAS_DLSYM}>:-DSWIFT_STDLIB_HAS_DLSYM>
100100
$<$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>:-DSWIFT_STDLIB_HAS_FILESYSTEM>
101101
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_ARCH="${SwiftCore_ARCH_SUBDIR}">
102-
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR}">)
102+
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR}">
103+
$<$<BOOL:${SwiftCore_ENABLE_BACKTRACE_REPORTING}>:-DSWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING>)
103104

104105
target_include_directories(swiftRuntime PRIVATE
105106
"${PROJECT_BINARY_DIR}/include"

0 commit comments

Comments
 (0)