Then I read up the related code, found that we need compile the dump_core function with no optimization(O0), but it seems the clang doesnot support the __attribute__((optimize((0)))).
I search the how to use per-function optimization attributes with clang
I find the __attribute__((optnone) works well.
I cannot find the attribute that gcc and clang all support, thus
I try to use predefined macros__clang__ to distinguish between clang and gcc, like this:
Hi, I find core_stacktrace failed when I used clang to compile satyr and make check. The log is
I searched the log and find a warning:
Then I read up the related code, found that we need compile the dump_core function with no optimization(O0), but it seems the clang doesnot support the
__attribute__((optimize((0))))
. I search the how to use per-function optimization attributes with clang I find the__attribute__((optnone)
works well. I cannot find the attribute that gcc and clang all support, thus I try to use predefined macros__clang__
to distinguish between clang and gcc, like this:My pr is #340, any advice is welcome!