From 52936e4a4624e87b79bcaa2795751a037104ece0 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade <quantum.analyst@gmail.com> Date: Thu, 31 Jan 2019 03:14:28 -0500 Subject: Add tsan and ubsan to g-ir-scanner workaround. Both of these need to link to their respective libraries to build. --- mesonbuild/modules/gnome.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mesonbuild/modules') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 2ab575c..871cd48 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -607,9 +607,15 @@ class GnomeModule(ExtensionModule): if 'b_sanitize' in compiler.base_options: sanitize = state.environment.coredata.base_options['b_sanitize'].value cflags += compilers.sanitizer_compile_args(sanitize) - if 'address' in sanitize.split(','): - internal_ldflags += ['-lasan'] # This must be first in ldflags - # FIXME: Linking directly to libasan is not recommended but g-ir-scanner + sanitize = sanitize.split(',') + # These must be first in ldflags + if 'address' in sanitize: + internal_ldflags += ['-lasan'] + if 'thread' in sanitize: + internal_ldflags += ['-ltsan'] + if 'undefined' in sanitize: + internal_ldflags += ['-lubsan'] + # FIXME: Linking directly to lib*san is not recommended but g-ir-scanner # does not understand -f LDFLAGS. https://bugzilla.gnome.org/show_bug.cgi?id=783892 # ldflags += compilers.sanitizer_link_args(sanitize) -- cgit v1.1