diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-04-08 13:20:15 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-04-09 00:02:30 +0900 |
commit | 7e43be7d0ebbf4b853f4f05218715d7337b677ba (patch) | |
tree | b1ad9ec92b0d859f682abb125d2a832cb4a69f0d /src/basic/macro.h | |
parent | 492f9e74ff2b7b07d0999a7241c16ed5e767fdeb (diff) | |
download | systemd-7e43be7d0ebbf4b853f4f05218715d7337b677ba.tar.gz |
meson: explicitly include coverage tweaks when built w/ --coverage
To make sure we don't miss any _exit() calls let's move the
coverage-related tweaks into a separate header file and include it
explicitly on the compiler command line using -include when a coverage
build is requested.
Follow-up to c6552ad381003a23cde7c3228e7071f30465df35.
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 685de73449..68d8b062e8 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -29,19 +29,6 @@ #define _alignptr_ __attribute__((__aligned__(sizeof(void*)))) #define _warn_unused_result_ __attribute__((__warn_unused_result__)) -#if defined(BUILT_WITH_COVERAGE) && BUILT_WITH_COVERAGE -/* We need to explicitly call __gcov_dump() in places where we use _exit(), since - * _exit() skips at-exit hooks resulting in lost coverage */ -# include <unistd.h> -extern void __gcov_dump(void); - -_noreturn_ static inline void _coverage__exit(int status) { - __gcov_dump(); - _exit(status); -} -# define _exit(x) _coverage__exit(x) -#endif - #if !defined(HAS_FEATURE_MEMORY_SANITIZER) # if defined(__has_feature) # if __has_feature(memory_sanitizer) |