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 f83c3e2d9f
commit bec8cd3375
2 changed files with 9 additions and 2 deletions

View File

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

View File

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