From ed3cc537cb34b6ab054a67d86a5c96258e7650d2 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Mon, 17 Oct 2016 18:41:00 -0400 Subject: gnome: Fix building gobject-introspection with sanitizer Fixes #922 --- mesonbuild/modules/gnome.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mesonbuild/modules/gnome.py') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index ea9b15a..bb6abd4 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -343,9 +343,18 @@ class GnomeModule: else: raise MesonException( 'Gir includes must be str, GirTarget, or list of them') + + cflags = [] if state.global_args.get('c'): + cflags += state.global_args['c'] + for compiler in state.compilers: + if compiler.get_language() == 'c': + sanitize = compiler.get_options().get('b_sanitize') + if sanitize: + cflags += compilers.sanitizer_compile_args(sanitize) + if cflags: scan_command += ['--cflags-begin'] - scan_command += state.global_args['c'] + scan_command += cflags scan_command += ['--cflags-end'] if kwargs.get('symbol_prefix'): sym_prefix = kwargs.pop('symbol_prefix') -- cgit v1.1