-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create switch for disabling callback logging
We're seeing reports of folks running into ODR issues when linking together TUs built with and without `NDEBUG` defined. The reason is that `unifex::inplace_stop_callback_base`'s size and layout depend on whether `NDEBUG` is defined, leading to incompatible ABIs between the two build modes. This change introduces a new preprocessor macro, `UNIFEX_LOG_DANGLING_STOP_CALLBACKS` that controls whether `inplace_stop_callback_base` knows a stringified typename of the deriving class and wheter `inplace_stop_source` uses that knowledge to log the names of dangling stop callbacks in its destructor. I've also updated `config.hpp.in` to retain existing behaviour: the default state for `UNIFEX_LOG_DANGLING_STOP_CALLBACKS` is on when `NDEBUG` is not defined an off when `NDEBUG` is defined. The defaults can be overridden.
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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