girepository: Always use currently built GLib to run g-ir-scanner

If we use the system libraries we can't really debug it, so ensure we're
using the currently built libraries for it too.

We're doing it globally to ensure that we're testing the result that
this version of the libraries are building
This commit is contained in:
Marco Trevisan (Treviño) 2024-05-10 04:55:57 +02:00
parent 4d89b379d1
commit f83c3e2d9f
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,12 @@ gi_gen_shared_dependencies = [
gi_gen_env_variables = environment() gi_gen_env_variables = environment()
# Use currently built libraries to run g-ir-scanner and the various tools
# this may not happen if we don't set the library paths.
gi_gen_env_variables.prepend(glib_exec_var_library_path,
fs.parent(libglib.full_path()), fs.parent(libgobject.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', glib_exec_asan_option_ignore_preload, separator: ',') 'ASAN_OPTIONS', glib_exec_asan_option_ignore_preload, separator: ',')

View File

@ -2673,9 +2673,11 @@ glib_exec_preloaded_libs = []
glib_exec_preloaded_env = {} glib_exec_preloaded_env = {}
if host_system in ['ios', 'darwin'] if host_system in ['ios', 'darwin']
glib_exec_var_library_path = 'DYLD_LIBRARY_PATH'
glib_exec_var_preload = 'DYLD_INSERT_LIBRARIES' glib_exec_var_preload = 'DYLD_INSERT_LIBRARIES'
glib_exec_var_preload_separator = ':' glib_exec_var_preload_separator = ':'
else else
glib_exec_var_library_path = 'LD_LIBRARY_PATH'
glib_exec_var_preload = 'LD_PRELOAD' glib_exec_var_preload = 'LD_PRELOAD'
glib_exec_var_preload_separator = ' ' glib_exec_var_preload_separator = ' '
endif endif