diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2019-01-31 03:14:28 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-31 22:11:18 +0200 |
commit | 52936e4a4624e87b79bcaa2795751a037104ece0 (patch) | |
tree | aeafb4721fb51d5033a1646cb2df14812f69ae2e /mesonbuild/modules | |
parent | 1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56 (diff) | |
download | meson-52936e4a4624e87b79bcaa2795751a037104ece0.zip meson-52936e4a4624e87b79bcaa2795751a037104ece0.tar.gz meson-52936e4a4624e87b79bcaa2795751a037104ece0.tar.bz2 |
Add tsan and ubsan to g-ir-scanner workaround.
Both of these need to link to their respective libraries to build.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/gnome.py | 12 |
1 files changed, 9 insertions, 3 deletions
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) |