aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2019-01-31 03:14:28 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-31 22:11:18 +0200
commit52936e4a4624e87b79bcaa2795751a037104ece0 (patch)
treeaeafb4721fb51d5033a1646cb2df14812f69ae2e /mesonbuild
parent1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56 (diff)
downloadmeson-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')
-rw-r--r--mesonbuild/modules/gnome.py12
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)