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

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented Jan 8, 2025

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

Copy link
Member

@compnerd compnerd left a 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 🤦‍♂️

@al45tair
Copy link
Contributor

al45tair commented Jan 9, 2025

This setting controls the backtrace that you get from fatalError(), which ends up calling reportNow() in Errors.cpp; there are a few other things that use this path also, mostly where the runtime is directly emitting diagnostics. Having the backtracer take over these backtraces is on my list of things to do (rdar://113562509).

@etcwilde
Copy link
Member Author

etcwilde commented Jan 9, 2025

This setting controls the backtrace that you get from fatalError(), which ends up calling reportNow() in Errors.cpp; there are a few other things that use this path also, mostly where the runtime is directly emitting diagnostics.

Okay, I can give this a better description then.

@etcwilde etcwilde force-pushed the ewilde/stdlib-rebuild-backtrace-reporting branch from 6a7f7b7 to 3c01edd Compare January 21, 2025 21:43
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde
Copy link
Member Author

@swift-ci please smoke test Windows

Add an option to enable emitting a stacktrace on calls to `fatalError`.
This is unrelated to the runtime backtracer for diagnosing normal Swift
crashes.

rdar://142440689
@etcwilde etcwilde force-pushed the ewilde/stdlib-rebuild-backtrace-reporting branch from 3c01edd to 5aadace Compare January 23, 2025 20:42
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde etcwilde requested review from al45tair and edymtt January 23, 2025 22:16
@etcwilde
Copy link
Member Author

@swift-ci please test Windows

@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@xavgru12
Copy link

xavgru12 commented Jan 24, 2025

Do we not have a formatter that formats the CMakeLists to a defined style?

@etcwilde
Copy link
Member Author

Do we not have a formatter that formats the CMakeLists to a defined style?

No. I am trying to keep it at least somewhat consistent within the new parts of the build with two-space indentation and putting closing parens on the last line, but that's about it.

@etcwilde etcwilde merged commit 95f4f6f into swiftlang:main Jan 25, 2025
3 checks passed
@etcwilde etcwilde deleted the ewilde/stdlib-rebuild-backtrace-reporting branch January 25, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants