emilk / loguru

A lightweight C++ logging library
The Unlicense
1.76k stars 256 forks source link

Only enable linux stacktraces when using glibc (#69) #206

Closed voyageur closed 2 years ago

voyageur commented 2 years ago

This is a follow-up to previous attempt #90 Stacktraces use glibc-specific extension execinfo.h, so currently loguru compilation will fail with other C libraries like musl with an error like:

loguru/loguru.cpp:103:18: fatal error: execinfo.h: No such file or directory 103 | #include // for backtrace

This change adds a check on GLIBC before enabling backtraces

skaravos commented 2 years ago

Is this okay to be merged now? The failing tests seem to have been unrelated, and likely have been resolved by #187

voyageur commented 2 years ago

I rebased on current master and used the simplified logic suggested before, hopefully tests will pass!