girepository: Disable ASAN when building our typelib

We don't care about memory issues during this phase while we should test
this separately
This commit is contained in:
Marco Trevisan (Treviño) 2024-05-24 15:30:42 +02:00
parent 5ca20f7dc0
commit fb5a50900e
2 changed files with 9 additions and 2 deletions

View File

@ -16,8 +16,9 @@ gi_gen_env_variables.prepend(glib_exec_var_library_path,
fs.parent(libgmodule.full_path()), fs.parent(libgio.full_path()))
if 'address' in glib_sanitizers
gi_gen_env_variables.append(
'ASAN_OPTIONS', glib_exec_asan_option_ignore_preload, separator: ',')
gi_gen_env_variables.append('ASAN_OPTIONS',
glib_exec_asan_options_disable,
separator: ',')
endif
# GLib

View File

@ -2616,12 +2616,18 @@ else
glib_exec_var_preload_separator = ' '
endif
glib_exec_asan_options_disable = []
glib_exec_asan_option_ignore_preload = ''
if 'address' in glib_sanitizers
# libasan needs to be the first in the preload list, and that we cant
# guarantee that, so we have to disable its link order checking when using
# LD_PRELOAD in tests.
glib_exec_asan_option_ignore_preload = 'verify_asan_link_order=false'
glib_exec_asan_options_disable = [
glib_exec_asan_option_ignore_preload,
'start_deactivated=true',
'detect_leaks=false',
]
endif
if glib_gnu_cc_compiler and host_system != 'windows'