summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2020-08-13 14:31:52 +0100
committerFrediano Ziglio <fziglio@redhat.com>2020-08-22 09:25:07 +0100
commit942bd130ddd3c331045c1d3e4f580909901d285a (patch)
tree33e3a2722f71b0b832b0a8b6994227edf4e53b0b /meson.build
parentf5121d14a76cada0ab1270a0e9f429a5347c87b8 (diff)
Allows to use Valgrind with ucontext coroutines
Changing stack is not usually instrumentation friendly. Allows to enable the usage of Valgrind memcheck calling some valgrind macros. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 405c589..6bbb4a8 100644
--- a/meson.build
+++ b/meson.build
@@ -61,6 +61,7 @@ headers = [
'sys/types.h',
'netinet/in.h',
'arpa/inet.h',
+ 'valgrind/valgrind.h'
]
foreach header : headers
@@ -346,6 +347,14 @@ if d.found()
spice_gtk_config_data.set('USE_SMARTCARD', '1')
endif
+# valgrind
+if get_option('valgrind')
+ if spice_gtk_config_data.get('HAVE_VALGRIND_VALGRIND_H', '0') != '1'
+ error('Valgrind requested but headers not found')
+ endif
+ spice_gtk_config_data.set('HAVE_VALGRIND', '1')
+endif
+
#
# global C defines
#