Skip to content

support platform-independent feature toggles#105

Merged
kris-jusiak merged 1 commit intocpp-testing:masterfrom
thorsten-klein:feature-toggles
Apr 7, 2026
Merged

support platform-independent feature toggles#105
kris-jusiak merged 1 commit intocpp-testing:masterfrom
thorsten-klein:feature-toggles

Conversation

@thorsten-klein
Copy link
Copy Markdown
Contributor

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() (e.g. Zephyr).

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

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
@kris-jusiak kris-jusiak merged commit 927a5aa into cpp-testing:master Apr 7, 2026
1 of 4 checks passed
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.

2 participants