Being able to manage asynchronous operations with libdex will drastically
simplify how we implement the profiler and instruments. We may eventually
do the same with libsysprof-analyze to parallelize some operations.
We have a lot of twisted options, and could really use some cleanup to
make that all more manageable. I don't know anywhere we care about not
checking for a C++ compiler, so just always check for that so we can use
the demangler.
I want to move a bunch of this "contrib" style sources into their own
area so we can statically link them but keep them separate from main
sysprof code.
The agent is statically linked so that it doesn't require using a properly
working libsysprof to be installed. This ensures that it continues to build
properly in that case so it can be used from org.gnome.Sdk.
Only some situations can use this properly without libunwind, so make
sure that we have it available unless -Dlibunwind=false.
Distributors, please be kind, use libunwind!
This release fixes an issue created during GNOME 40 development where the
libsysprof-capture-4.a library could leak symbols into a shared library
that consumed it (such as Pango, GTK 4, and GLib).
This fixes that by removing symbol visibility from libsysprof-capture.a.
Distributions are encouraged to rebuild their libraries that consume
Sysprof's libsysprof-capture-4.a.
The visibility of symbols was getting extracted from the .a into the
libraries that link_whole the archive. We can simply disable the visibility
from the .a with a custom config.h.meson which avoids it for the capture
library. Since we already double-compile those sources for the shared
library, the shared library visibility is not affected.
This was tested by compiling a simple library which calls
sysprof_clock_init() and ensuring that no extra symbols were found with
`nm libfoo.so | grep ' T '`.
Fixes#60
Check for -fstack-protector-strong availability through
has_link_argument as some compilers could missed the needed library
(-lssp or -lssp_nonshared) at linking step resulting in a build failure.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>