-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[build] Integrate backward_cpp to test targets for enabling C++ stack trace #6697
Conversation
✅ Deploy Preview for docsite-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
964656f
to
753193e
Compare
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.
@jim19930609 instead of coupling with TI_BUILD_TESTS, shall we add a new toggle for backward-cpp itself to make it cleaner?
For example:
- if in CI we just set TI_WITH_BT on by default, and whatever targets (whether they're tests or not) can be built with backward-cpp.
The main reason I'm asking for it is that we may want to build a taichi in debug mode (with backtrace) and it's a bit weird to say we need to turn on TI_BUILD_TESTS which is supposed to only toggle on/off of build test targets?
/rebase |
0e2aef0
to
0bfe0e0
Compare
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.
Thanks!
Issue: #
Brief Summary
When building with
-DTI_BUILD_TESTS=ON
,taichi_cpp_tests
,taichi_c_api_tests
,taichi_python.so
will link to an external library: https://github.com/bombela/backward-cpp, which enables C++ stack trace upon test failures.Segfault with python tests
python3 test.py
Segfault with cpp tests
./build/taichi_cpp_tests
Segfault with c_api tests
./build/taichi_c_api_tests