Skip to content

CMake: SwiftCore: Add back SWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING #78497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Runtimes/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ option(SwiftCore_ENABLE_OS_TRACE_LAZY_INIT "Use os_trace call to check if lazy i

defaulted_option(SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support")
defaulted_set(SwiftCore_BACKTRACER_PATH STRING "Set a fixed path to the Swift backtracer")
defaulted_option(SwiftCore_ENABLE_FATALERROR_BACKTRACE "Build stdlib fatalError with backtrace output")

option(SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS "" OFF)
option(SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER "" OFF)
Expand Down
3 changes: 3 additions & 0 deletions Runtimes/Core/cmake/modules/DefaultSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if(APPLE)
set(SwiftCore_ENABLE_CRASH_REPORTER_CLIENT_default ON)
set(SwiftCore_ENABLE_OBJC_INTEROP_default ON)
set(SwiftCore_ENABLE_REFLECTION_default ON)
set(SwiftCore_ENABLE_FATALERROR_BACKTRACE_default ON)
set(SwiftCore_ENABLE_RUNTIME_OS_VERSIONING ON)
set(SwiftCore_ENABLE_OVERRIDABLE_RETAIN_RELEASE ON)
set(SwiftCore_THREADING_PACKAGE "DARWIN")
Expand All @@ -45,6 +46,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "WASM")
set(SwiftCore_THREADING_PACKAGE "NONE")
elseif(LINUX OR ANDROID OR BSD)
set(SwiftCore_OBJECT_FORMAT_default "elf")
set(SwiftCore_ENABLE_FATALERROR_BACKTRACE_default ON)
if(LINUX)
set(SwiftCore_THREADING_PACKAGE "LINUX")
else()
Expand All @@ -53,6 +55,7 @@ elseif(LINUX OR ANDROID OR BSD)
elseif(WIN32)
set(SwiftCore_OBJECT_FORMAT_default "coff")
set(SwiftCore_THREADING_PACKAGE "WIN32")
set(SwiftCore_ENABLE_FATALERROR_BACKTRACE_default ON)
endif()

include("${SwiftCore_VENDOR_MODULE_DIR}/DefaultSettings.cmake" OPTIONAL)
1 change: 1 addition & 0 deletions Runtimes/Core/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ target_compile_definitions(swiftRuntime
$<$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>:-DSWIFT_STDLIB_HAS_FILESYSTEM>
$<$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>:-DSWIFT_ARCH="${SwiftCore_ARCH_SUBDIR}">
$<$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>:-DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR}">
$<$<BOOL:${SwiftCore_ENABLE_FATALERROR_BACKTRACE}>:-DSWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING>
PUBLIC
$<$<BOOL:${SwiftCore_ENABLE_OS_TRACE_LAZY_INIT}>:-DSWIFT_USE_OS_TRACE_LAZY_INIT>)

Expand Down