-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
CMake: SwiftCore: Add back SWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING #78497
base: main
Are you sure you want to change the base?
CMake: SwiftCore: Add back SWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING #78497
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not confusing at all 🤦♂️
This setting controls the backtrace that you get from |
@@ -100,6 +101,7 @@ defaulted_option(SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime. | |||
option(SwiftCore_ENABLE_UNICODE_DATA "Include unicode data in Swift runtimes" ON) | |||
option(SwiftCore_ENABLE_SHORT_MANGLING_LOOKUPS "Build with fast-path context descriptor lookups based on well-known short manglings." ON) | |||
option(SwiftCore_ENABLE_FILESYSTEM_SUPPORT "Build for systems that have a filesystem" ON) | |||
option(SwiftCore_ENABLE_BACKTRACE_REPORTING "Build with backtrace reporting support" ${SwiftCore_HAS_BACKTRACE}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be enabled on Windows (which doesn't have backtrace()
) and on ELF platforms where we use the unwinder instead of backtrace()
… is that going to be handled in cache files rather than by logic here?
Okay, I can give this a better description then. |
@@ -99,7 +99,8 @@ target_compile_definitions(swiftRuntime | |||
$<$<BOOL:${SwiftCore_HAS_DLSYM}>:-DSWIFT_STDLIB_HAS_DLSYM> | |||
$<$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>:-DSWIFT_STDLIB_HAS_FILESYSTEM> | |||
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_ARCH="${SwiftCore_ARCH_SUBDIR}"> | |||
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR}">) | |||
$<$<AND:$<BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT}>,$<COMPILE_LANGUAGE:C,CXX>>:-DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR}"> | |||
$<$<BOOL:${SwiftCore_ENABLE_BACKTRACE_REPORTING}>:-DSWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Optional) we may consider moving the closing parenthesis on a new line, so to make subsequent diffs more straightforward in their intent, e.g.
$<$<BOOL:${SwiftCore_ENABLE_BACKTRACE_REPORTING}>:-DSWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING>) | |
$<$<BOOL:${SwiftCore_ENABLE_BACKTRACE_REPORTING}>:-DSWIFT_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.
@mikeash and @al45tair, is there some way that we can merge these concepts or at least have a better description of how they differ.
rdar://142440689