Add tsan and ubsan to g-ir-scanner workaround.

Both of these need to link to their respective libraries to build.
pull/4862/head
Elliott Sales de Andrade 6 years ago committed by Jussi Pakkanen
parent 1575bd988a
commit 52936e4a46
  1. 12
      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)

Loading…
Cancel
Save