support platform-independent feature toggles#105
Merged
kris-jusiak merged 1 commit intocpp-testing:masterfrom Apr 7, 2026
Merged
support platform-independent feature toggles#105kris-jusiak merged 1 commit intocpp-testing:masterfrom
kris-jusiak merged 1 commit intocpp-testing:masterfrom
Conversation
Replace hardcoded platform checks with feature toggles to allow users to configure gunit for their platform, e.g. if lacking POSIX features like backtrace() and popen(). Feature Flags added: 1. GUNIT_HAS_BACKTRACE - Controls backtrace() and backtrace_symbols() support 2. GUNIT_HAS_ADDR2LINE - Controls popen()/pclose() and addr2line functionality 3. GUNIT_HAS_DEMANGLE - Controls C++ name demangling via cxxabi.h 4. GUNIT_HAS_PROGNAME - Controls program name retrieval
ab882e0 to
1b41072
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace hardcoded platform checks with feature toggles to allow users to configure gunit for their platform, e.g. if lacking POSIX features like
backtrace()andpopen()(e.g. Zephyr).Feature Flags added:
GUNIT_HAS_BACKTRACE- Controls backtrace() and backtrace_symbols() supportGUNIT_HAS_ADDR2LINE- Controls popen()/pclose() and addr2line functionalityGUNIT_HAS_DEMANGLE- Controls C++ name demangling via cxxabi.hGUNIT_HAS_PROGNAME- Controls program name retrieval